Skip to content

Commit

Permalink
Make PodioOutput exit gracefully instead of crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Nov 9, 2023
1 parent 95931b5 commit 11f2757
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion k4FWCore/components/PodioOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ StatusCode PodioOutput::execute() {
}
m_framewriter->writeFrame(frame, "events", m_collection_names_to_write);
} else {
m_framewriter->writeFrame(frame, "events", m_collection_names_to_write);
try {
m_framewriter->writeFrame(frame, "events", m_collection_names_to_write);
} catch (std::runtime_error& e) {
error() << "Could not write event: " << e.what() << endmsg;
return StatusCode::FAILURE;
}
}
m_firstEvent = false;

Expand Down

0 comments on commit 11f2757

Please sign in to comment.