Kaydet (Commit) ee0f878d authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1251596 Uncaught exception

Change-Id: I02b7abcd9ee17158ee063b2c9b6d0324eef70801
üst 5b7497e5
...@@ -909,38 +909,51 @@ int GrindApp::Main() ...@@ -909,38 +909,51 @@ int GrindApp::Main()
SAL_IMPLEMENT_MAIN() SAL_IMPLEMENT_MAIN()
{ {
bool bHelp = false; try
for( sal_uInt16 i = 0; i < Application::GetCommandLineParamCount(); i++ )
{ {
OUString aParam = Application::GetCommandLineParam( i ); bool bHelp = false;
if( aParam == "--help" || aParam == "-h" ) for( sal_uInt16 i = 0; i < Application::GetCommandLineParamCount(); i++ )
bHelp = true; {
} OUString aParam = Application::GetCommandLineParam( i );
if( bHelp ) if( aParam == "--help" || aParam == "-h" )
{ bHelp = true;
printf( "outdevgrind - Profile OutputDevice\n" ); }
return EXIT_SUCCESS;
} if( bHelp )
{
printf( "outdevgrind - Profile OutputDevice\n" );
return EXIT_SUCCESS;
}
tools::extendApplicationEnvironment(); tools::extendApplicationEnvironment();
uno::Reference< uno::XComponentContext > xContext = cppu::defaultBootstrap_InitialComponentContext(); uno::Reference< uno::XComponentContext > xContext = cppu::defaultBootstrap_InitialComponentContext();
uno::Reference< lang::XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), uno::UNO_QUERY ); uno::Reference< lang::XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), uno::UNO_QUERY );
if( !xServiceManager.is() ) if( !xServiceManager.is() )
Application::Abort( "Failed to bootstrap" ); Application::Abort( "Failed to bootstrap" );
comphelper::setProcessServiceFactory( xServiceManager ); comphelper::setProcessServiceFactory( xServiceManager );
InitVCL(); InitVCL();
GrindApp aGrindApp; GrindApp aGrindApp;
aGrindApp.Main(); aGrindApp.Main();
DeInitVCL(); DeInitVCL();
}
catch (const css::uno::Exception& e)
{
SAL_WARN("vcl.app", "Fatal exception: " << e.Message);
return EXIT_FAILURE;
}
catch (const std::exception& e)
{
SAL_WARN("vcl.app", "Fatal exception: " << e.what());
return EXIT_FAILURE;
}
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment