summaryrefslogtreecommitdiff
path: root/vcl/workben/svpclient.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-05 10:05:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-05 14:57:56 +0000
commite90ba3912747b67873344dea14e2a5821ec766c8 (patch)
treee7b63a19f32de84227c36b8c5f8aafdee23eae31 /vcl/workben/svpclient.cxx
parent5e48dc03fe3dfb173fe65c46d52552149b255032 (diff)
coverity#1215395 Uncaught exception
Change-Id: I44246f85acf197fa1707b37691f21e6e996bc2d3
Diffstat (limited to 'vcl/workben/svpclient.cxx')
-rw-r--r--vcl/workben/svpclient.cxx28
1 files changed, 18 insertions, 10 deletions
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 915dd9cdc986..3f9e274d0615 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -59,20 +59,28 @@ void Main();
SAL_IMPLEMENT_MAIN()
{
- tools::extendApplicationEnvironment();
+ try
+ {
+ tools::extendApplicationEnvironment();
- // create the global service-manager
- Reference< XComponentContext > xContext = defaultBootstrap_InitialComponentContext();
- Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
+ // create the global service-manager
+ Reference< XComponentContext > xContext = defaultBootstrap_InitialComponentContext();
+ Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
- if( !xServiceManager.is() )
- Application::Abort( "Failed to bootstrap" );
+ if( !xServiceManager.is() )
+ Application::Abort( "Failed to bootstrap" );
- comphelper::setProcessServiceFactory( xServiceManager );
+ comphelper::setProcessServiceFactory( xServiceManager );
- InitVCL();
- ::Main();
- DeInitVCL();
+ InitVCL();
+ ::Main();
+ DeInitVCL();
+ }
+ catch (const Exception& e)
+ {
+ SAL_WARN("vcl.app", "Fatal exception: " << e.Message);
+ return 1;
+ }
return 0;
}