From 0fd88be5a37a228949c2f6f55a643e7d7bf4bf33 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 4 Nov 2014 12:45:20 +0000 Subject: [PATCH] Catch all errors when parsing boost program_options in IfcConvert --- src/ifcconvert/IfcConvert.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ifcconvert/IfcConvert.cpp b/src/ifcconvert/IfcConvert.cpp index f700e939dd..5cb7a04316 100644 --- a/src/ifcconvert/IfcConvert.cpp +++ b/src/ifcconvert/IfcConvert.cpp @@ -128,6 +128,8 @@ int main(int argc, char** argv) { } catch (const boost::program_options::unknown_option& e) { std::cerr << "[Error] Unknown option '" << e.get_option_name() << "'" << std::endl << std::endl; // Usage information will be emitted below + } catch (...) { + // Catch other errors such as invalid command line syntax } boost::program_options::notify(vmap);