Skip to content

Commit

Permalink
Better exception handling in JEventUnfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwbrei committed May 2, 2024
1 parent 40376ef commit f34e05f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/libraries/JANA/JEventUnfolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ class JEventUnfolder : public jana::omni::JComponent,
}
throw ex;
}
catch (std::exception& e) {
auto ex = JException("Exception in JEventUnfolder::DoPreprocess(): %s", e.what());
ex.nested_exception = std::current_exception();
ex.plugin_name = m_plugin_name;
ex.component_name = m_type_name;
throw ex;
}
catch (...) {
auto ex = JException("Unknown exception in JEventUnfolder::DoPreprocess()");
ex.nested_exception = std::current_exception();
Expand Down Expand Up @@ -182,6 +189,13 @@ class JEventUnfolder : public jana::omni::JComponent,
}
throw ex;
}
catch (std::exception& e) {
auto ex = JException("Exception in JEventUnfolder::DoUnfold(): %s", e.what());
ex.nested_exception = std::current_exception();
ex.plugin_name = m_plugin_name;
ex.component_name = m_type_name;
throw ex;
}
catch (...) {
auto ex = JException("Exception in JEventUnfolder::DoUnfold()");
ex.nested_exception = std::current_exception();
Expand Down

0 comments on commit f34e05f

Please sign in to comment.