From 1e4a3a9ce5894657ef95353ac7f6318dea6d7c7b Mon Sep 17 00:00:00 2001 From: Brett Ryland Date: Wed, 10 Aug 2016 17:18:11 +0200 Subject: [PATCH] Making the error handling a little prettier. --- source/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index d50a980..c1d54d6 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -60,12 +60,11 @@ int main(int argc, char *argv[]) throw std::runtime_error("Unknown flag " + var); } } - } - catch (const std::exception& e) - { + } catch (const std::exception& e) { std::cout << e.what() << ", aborting." << std::endl; return 1; - //throw std::runtime_error("Unable to parse input arguments."); + } catch(...) { + throw std::runtime_error("Unable to parse input arguments."); } float hint = Waves::g_waves.Initialise(rx, ry, dt, IC, BC);