From e9c3c48dfa8ea8ebddb2550a1cdd9981c8874bf8 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 9 Feb 2011 16:16:24 +0100 Subject: [PATCH] Add a catchall case in exception handler. --- main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 9bffd8b..9a33928 100644 --- a/main.cpp +++ b/main.cpp @@ -75,9 +75,12 @@ static int simulation_main(int argc, char* argv[]) delete proc; } - catch (std::invalid_argument& e) { + catch (const std::invalid_argument& e) { THROW1(arg_error, 0, "%s", e.what()); } + catch (const std::exception& e) { + THROW1(0, 0, "%s", e.what()); + } return result; } -- 2.39.5