diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-23 16:16:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-24 09:24:50 +0100 |
commit | cd31cfbf170e269a7063e232b062a9ca35b4f5fa (patch) | |
tree | b41191bc1fc3778505b587a014b1601a4e27e8c4 /codemaker | |
parent | 1ff8fbba36e00170c65572fbe21e8e51925ac8ae (diff) |
coverity#441732 Uncaught exception
Change-Id: Icd11b81566fec7ce4855cd4e54ff3a3d9862d354
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/javamaker/javamaker.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/codemaker/source/javamaker/javamaker.cxx b/codemaker/source/javamaker/javamaker.cxx index d74aafa31810..2e977633108c 100644 --- a/codemaker/source/javamaker/javamaker.cxx +++ b/codemaker/source/javamaker/javamaker.cxx @@ -42,11 +42,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { if (!options.initOptions(argc, argv)) { return EXIT_FAILURE; } - } catch (IllegalArgument & e) { - std::cerr << "Illegal option " << e.m_message << '\n'; - return EXIT_FAILURE; - } - try { + rtl::Reference< TypeManager > typeMgr(new TypeManager); for (std::vector< rtl::OString >::const_iterator i( options.getExtraInputFiles().begin()); @@ -90,6 +86,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { << "ERROR: Bad format of <" << e.getUri() << ">, \"" << e.getDetail() << "\"\n"; return EXIT_FAILURE; + } catch (IllegalArgument & e) { + std::cerr << "Illegal option " << e.m_message << '\n'; + return EXIT_FAILURE; } return EXIT_SUCCESS; } |