From 2789cbd76dfc8830198cfecd986efa6f24f2d6eb Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Mon, 15 Apr 2024 22:41:38 -0400 Subject: [PATCH 1/2] Bugfix: Exceptions in JPluginLoader produce correct exit code --- src/libraries/JANA/CLI/JMain.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libraries/JANA/CLI/JMain.cc b/src/libraries/JANA/CLI/JMain.cc index 6e869c77b..a28d31a02 100644 --- a/src/libraries/JANA/CLI/JMain.cc +++ b/src/libraries/JANA/CLI/JMain.cc @@ -126,10 +126,17 @@ int Execute(JApplication* app, UserOptions &options) { catch (JException& e) { std::cout << "----------------------------------------------------------" << std::endl; std::cout << e << std::endl; + app->SetExitCode((int) JApplication::ExitCode::UnhandledException); } - catch (std::runtime_error& e) { + catch (std::exception& e) { std::cout << "----------------------------------------------------------" << std::endl; std::cout << "Exception: " << e.what() << std::endl; + app->SetExitCode((int) JApplication::ExitCode::UnhandledException); + } + catch (...) { + std::cout << "----------------------------------------------------------" << std::endl; + std::cout << "Unknown exception" << std::endl; + app->SetExitCode((int) JApplication::ExitCode::UnhandledException); } } return (int) app->GetExitCode(); From c32f9d0d5cb2411c192a3183480017ff95c2059e Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Mon, 15 Apr 2024 23:01:59 -0400 Subject: [PATCH 2/2] Turn off TimesliceExample for now TimesliceExample requires Podio, which requires ROOT, neither of which we have here. --- .github/workflows/ccpp-linux.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ccpp-linux.yml b/.github/workflows/ccpp-linux.yml index b105f4885..9e39dc8fd 100644 --- a/.github/workflows/ccpp-linux.yml +++ b/.github/workflows/ccpp-linux.yml @@ -48,12 +48,7 @@ jobs: export JANA_PLUGIN_PATH=$GITHUB_WORKSPACE/Linux/plugins echo "--- Running JTest plugin -----------------------" $GITHUB_WORKSPACE/Linux/bin/jana -PPLUGINS=JTest -Pjana:nevents=100 - - name: janatests + - name: jana-unit-tests run: | echo "--- Running jana-unit-tests ------------------------------" $GITHUB_WORKSPACE/Linux/bin/jana-unit-tests - - name: BlockExample - run: | - echo "--- Running TimesliceExample ------------------------------" - $GITHUB_WORKSPACE/Linux/bin/jana -Pjana:nevents=100 -Pnthreads=4 -Pplugins=$GITHUB_WORKSPACE/Linux/plugins/TimesliceExample.so -