summaryrefslogtreecommitdiff
path: root/vcl/source/uipreviewer
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-08 08:24:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-08 09:17:06 +0100
commitd396d5b47876f47b51d3ba42861895e86831738b (patch)
tree122c959c52ccdf54ab66fa9a82690e2b1ca2b524 /vcl/source/uipreviewer
parent00212cdb3ee2bb0b4d8fb61a482a7f9f01c0a9b7 (diff)
coverity#1237357 Uncaught exception
Change-Id: Ie116e0070792c59893ed0b4f41bcf9831400deb9
Diffstat (limited to 'vcl/source/uipreviewer')
-rw-r--r--vcl/source/uipreviewer/previewer.cxx10
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()