From: Arnaud Giersch Date: Wed, 9 Feb 2011 15:16:24 +0000 (+0100) Subject: Add a catchall case in exception handler. X-Git-Tag: v0.1~152 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/e9c3c48dfa8ea8ebddb2550a1cdd9981c8874bf8?ds=inline Add a catchall case in exception handler. --- 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; }