better error handling
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2023-03-10 17:34:52 +01:00
parent 4e8e85f450
commit 3c0b8f9e8b
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -224,6 +224,10 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() {
dumpParams.currentSize = 0;
dumpParams.currentFileUnixStamp = fileEpoch;
std::ifstream ifile(file, std::ios::binary);
if(ifile.bad()) {
sif::error << "PersistentTmStore: File is bad" << std::endl;
continue;
}
ifile.read(reinterpret_cast<char*>(fileBuf.data()),
static_cast<std::streamsize>(dumpParams.fileSize));
break;