From 074a77d4de336526979eacbc7c5f640ab429faa1 Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Tue, 19 Nov 2024 13:16:18 -0500 Subject: [PATCH] JExecutionEngine sets exit codes --- src/libraries/JANA/Engine/JExecutionEngine.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libraries/JANA/Engine/JExecutionEngine.cc b/src/libraries/JANA/Engine/JExecutionEngine.cc index 4c8d77f5b..c9ae36edf 100644 --- a/src/libraries/JANA/Engine/JExecutionEngine.cc +++ b/src/libraries/JANA/Engine/JExecutionEngine.cc @@ -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;