summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-05 10:27:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-05 14:57:58 +0000
commitf177ab81ced99975851897df389ce62d6e91adf4 (patch)
tree29049c19b215416c1831c05c35d47887cdb4eea0 /svx
parent680438cb97b36f17c6b418ec2556a55c998ca520 (diff)
coverity#1215393 Uncaught exception
Change-Id: I96575d843fd982866c89000bb4426bd5e11c56d1
Diffstat (limited to 'svx')
-rw-r--r--svx/workben/pixelctl.cxx36
1 files changed, 22 insertions, 14 deletions
diff --git a/svx/workben/pixelctl.cxx b/svx/workben/pixelctl.cxx
index 37e106e380d9..f9620425060d 100644
--- a/svx/workben/pixelctl.cxx
+++ b/svx/workben/pixelctl.cxx
@@ -46,20 +46,28 @@ void Main();
SAL_IMPLEMENT_MAIN()
{
- tools::extendApplicationEnvironment();
-
- // 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" );
-
- comphelper::setProcessServiceFactory( xServiceManager );
-
- InitVCL();
- ::Main();
- DeInitVCL();
+ try
+ {
+ tools::extendApplicationEnvironment();
+
+ // 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" );
+
+ comphelper::setProcessServiceFactory( xServiceManager );
+
+ InitVCL();
+ ::Main();
+ DeInitVCL();
+ }
+ catch (const Exception& e)
+ {
+ SAL_WARN("vcl.app", "Fatal exception: " << e.Message);
+ return 1;
+ }
return 0;
}