summaryrefslogtreecommitdiff
path: root/vcl/workben
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-05 10:06:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-05 14:57:57 +0000
commit37b3a5dc5bf0720a585ae0cd6d64f081247e1aa1 (patch)
treefeb7cfafe778f1d18bcc7f5cf0fed52fe77f6132 /vcl/workben
parente90ba3912747b67873344dea14e2a5821ec766c8 (diff)
coverity#1215387 Uncaught exception
Change-Id: I3e34d078772c701d07c14de0da45bbdcb7b44838
Diffstat (limited to 'vcl/workben')
-rw-r--r--vcl/workben/svdem.cxx34
1 files changed, 21 insertions, 13 deletions
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index ed2b297d01b9..a06bf5cc13d7 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -40,19 +40,27 @@ void Main();
SAL_IMPLEMENT_MAIN()
{
- tools::extendApplicationEnvironment();
-
- Reference< XComponentContext > xContext = defaultBootstrap_InitialComponentContext();
- Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
-
- if( !xServiceManager.is() )
- Application::Abort( "Failed to bootstrap" );
-
- comphelper::setProcessServiceFactory( xServiceManager );
-
- InitVCL();
- ::Main();
- DeInitVCL();
+ try
+ {
+ tools::extendApplicationEnvironment();
+
+ Reference< XComponentContext > xContext = defaultBootstrap_InitialComponentContext();
+ Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
+
+ if( !xServiceManager.is() )
+ Application::Abort( "Failed to bootstrap" );
+
+ comphelper::setProcessServiceFactory( xServiceManager );
+
+ InitVCL();
+ ::Main();
+ DeInitVCL();
+ }
+ catch (const Exception& e)
+ {
+ SAL_WARN("vcl.app", "Fatal exception: " << e.Message);
+ return 1;
+ }
return 0;
}