diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-09-08 08:24:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-08 09:17:06 +0100 |
commit | d396d5b47876f47b51d3ba42861895e86831738b (patch) | |
tree | 122c959c52ccdf54ab66fa9a82690e2b1ca2b524 /vcl | |
parent | 00212cdb3ee2bb0b4d8fb61a482a7f9f01c0a9b7 (diff) |
coverity#1237357 Uncaught exception
Change-Id: Ie116e0070792c59893ed0b4f41bcf9831400deb9
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/uipreviewer/previewer.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx index 5bd2d3d3812f..1e318ff20a38 100644 --- a/vcl/source/uipreviewer/previewer.cxx +++ b/vcl/source/uipreviewer/previewer.cxx @@ -64,6 +64,8 @@ int UIPreviewApp::Main() // turn on tooltips Help::EnableQuickHelp(); + int nRet = EXIT_SUCCESS; + try { Dialog *pDialog = new Dialog(DIALOG_NO_PARENT, WB_STDDIALOG | WB_SIZEABLE); @@ -93,9 +95,15 @@ int UIPreviewApp::Main() catch (const uno::Exception &e) { fprintf(stderr, "fatal error: %s\n", OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr()); + nRet = EXIT_FAILURE; + } + catch (const std::exception &e) + { + fprintf(stderr, "fatal error: %s\n", e.what()); + nRet = EXIT_FAILURE; } - return EXIT_SUCCESS; + return nRet; } void vclmain::createApplication() |