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 - 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();