From d396d5b47876f47b51d3ba42861895e86831738b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 8 Sep 2014 08:24:40 +0100 Subject: coverity#1237357 Uncaught exception Change-Id: Ie116e0070792c59893ed0b4f41bcf9831400deb9 --- vcl/source/uipreviewer/previewer.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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() -- cgit