catch EOF gracefully in ubxtool

pull/52/head
bert hubert 2019-12-02 14:41:06 +01:00
parent 5d1ef42e4e
commit 68083eb12a
1 changed files with 4 additions and 0 deletions

View File

@ -1349,6 +1349,10 @@ int main(int argc, char** argv)
catch(UBXMessage::BadChecksum &e) {
if (doDEBUG) { cerr<<humanTimeNow()<<" Bad UBX checksum, skipping message"<<endl; }
}
catch(EofException& em) {
cerr<<"EOF, break"<<endl;
break;
}
}
if(!g_fromFile)
tcsetattr(fd, TCSANOW, &g_oldtio);