From 4de4bf0692c49fd60dbbc2b836e6b68120605033 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Wed, 3 Aug 2016 15:01:43 -0500 Subject: [PATCH] Monte carlo AttributeError's caused by bad configuration still returns zero in master sim #269 If there were bad runs, the master will now exit with a non-zero status. --- .../MonteCarlo/src/MonteCarlo_master_shutdown.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trick_source/sim_services/MonteCarlo/src/MonteCarlo_master_shutdown.cpp b/trick_source/sim_services/MonteCarlo/src/MonteCarlo_master_shutdown.cpp index 60159364..0f3d7021 100644 --- a/trick_source/sim_services/MonteCarlo/src/MonteCarlo_master_shutdown.cpp +++ b/trick_source/sim_services/MonteCarlo/src/MonteCarlo_master_shutdown.cpp @@ -36,6 +36,10 @@ void Trick::MonteCarlo::master_shutdown() { print_statistics(&stdout) ; fclose(file_ptr) ; + if ( !except_return and failed_runs.size() > 0 ) { + except_return = -2 ; + } + exit(except_return); }