From 37133dceeb541c42a02390e9a461d7c2802e6841 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 18 Mar 2020 08:40:50 +0100 Subject: zmq2edi: also catch logic errors in main() --- src/zmq2edi/zmq2edi.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/zmq2edi/zmq2edi.cpp b/src/zmq2edi/zmq2edi.cpp index f7d733c..885f01d 100644 --- a/src/zmq2edi/zmq2edi.cpp +++ b/src/zmq2edi/zmq2edi.cpp @@ -426,8 +426,11 @@ int main(int argc, char **argv) try { return start(argc, argv); } - catch (std::runtime_error &e) { - etiLog.level(error) << "Error: " << e.what(); + catch (const std::runtime_error &e) { + etiLog.level(error) << "Runtime error: " << e.what(); + } + catch (const std::logic_error &e) { + etiLog.level(error) << "Logic error! " << e.what(); } return 1; -- cgit v1.2.3