@@ -172,7 +172,7 @@ namespace dqmservices {
172172 if (unitTest_) {
173173 throw edm::Exception (edm::errors::FileReadError, " DQMStreamerReader::openNextFileInp" )
174174 << std::string (" Can't deserialize registry data (in open file): " ) + e.what ()
175- << " \n error: data file corrupted" ;
175+ << " \n error: data file corrupted, rethrowing! " ;
176176 }
177177
178178 fiterator_.logFileAction (std::string (" Can't deserialize registry data (in open file): " ) + e.what (), p);
@@ -354,6 +354,12 @@ namespace dqmservices {
354354
355355 deserializeEvent (*eview);
356356 } catch (const cms::Exception& e) {
357+ if (unitTest_) {
358+ throw edm::Exception (edm::errors::FileReadError, " DQMStreamerReader::checkNext" )
359+ << std::string (" Can't deserialize event or registry data: " ) + e.what ()
360+ << " \n error: data file corrupted, rethrowing!" ;
361+ }
362+
357363 // try to recover from corrupted files/events
358364 fiterator_.logFileAction (std::string (" Can't deserialize event or registry data: " ) + e.what ());
359365 closeFileImp_ (" data file corrupted" );
@@ -435,6 +441,11 @@ namespace dqmservices {
435441 }
436442 }
437443 } catch (const cms::Exception& e) {
444+ if (unitTest_) {
445+ throw edm::Exception (edm::errors::FileReadError, " DQMStreamerReader::skip" )
446+ << std::string (" Can't deserialize registry data: " ) + e.what ()
447+ << " \n error: data file corrupted, rethrowing!" ;
448+ }
438449 // try to recover from corrupted files/events
439450 fiterator_.logFileAction (std::string (" Can't deserialize event data: " ) + e.what ());
440451 closeFileImp_ (" data file corrupted" );
0 commit comments