Skip to content

Commit

Permalink
JExecutionEngine sets exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwbrei committed Nov 19, 2024
1 parent 51a5a6f commit 074a77d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libraries/JANA/Engine/JExecutionEngine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,11 @@ void JExecutionEngine::HandleFailures() {
// In reality all callers are going to print everything they can about the exception and exit.
for (auto& worker: m_worker_states) {
if (worker->stored_exception != nullptr) {
GetApplication()->SetExitCode((int) JApplication::ExitCode::UnhandledException);
std::rethrow_exception(worker->stored_exception);
}
if (worker->is_timed_out) {
GetApplication()->SetExitCode((int) JApplication::ExitCode::Timeout);
auto ex = JException("Timeout in worker thread");
ex.stacktrace = worker->backtrace.ToString();
throw ex;
Expand Down

0 comments on commit 074a77d

Please sign in to comment.