From cae3fd6aa349ac037be2e1bc5e33956e005021cb Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Thu, 22 Jun 2017 14:45:39 +0200 Subject: [PATCH] Catch any exception type in the main of runFairMQDevice.h --- fairmq/runFairMQDevice.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fairmq/runFairMQDevice.h b/fairmq/runFairMQDevice.h index 8cf1b052..aa4ce3b7 100644 --- a/fairmq/runFairMQDevice.h +++ b/fairmq/runFairMQDevice.h @@ -69,6 +69,11 @@ int main(int argc, char** argv) LOG(ERROR) << "Unhandled exception reached the top of main: " << e.what() << ", application will now exit"; return 1; } + catch (...) + { + LOG(ERROR) << "Non-exception instance being thrown. Please make sure you use std::runtime_exception() instead. Application will now exit."; + return 1; + } return 0; }