From 889dc7bffa02236bf2ad56b382997771f0fcf3c6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 15 Aug 2019 15:56:55 +0200 Subject: use more TOOLS_WARN_EXCEPTION Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin --- desktop/source/app/app.cxx | 3 +-- desktop/source/app/check_ext_deps.cxx | 3 +-- desktop/source/deployment/gui/dp_gui_dialog2.cxx | 6 ++---- desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 3 +-- desktop/source/deployment/manager/dp_manager.cxx | 6 ++---- desktop/source/deployment/registry/package/dp_package.cxx | 10 +++++----- desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx | 3 +-- 7 files changed, 13 insertions(+), 21 deletions(-) (limited to 'desktop/source') diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 380e21fd8fca..bd203f943739 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2501,8 +2501,7 @@ IMPL_STATIC_LINK_NOARG(Desktop, AsyncInitFirstRun, Timer *, void) } catch(const css::uno::Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "desktop.app", "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ... " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "desktop.app", "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor" ); } } diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index 6fb85c4a685a..8abb2ffbda5e 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -295,8 +295,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext } catch ( const uno::RuntimeException & ) { throw; } catch (const uno::Exception & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "desktop.app", exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "desktop.app", "" ); } if ( bRegistered ) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 0de89e91d050..765f0939845d 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -682,8 +682,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker() } catch (const lang::IllegalArgumentException &) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "desktop", exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "desktop", "" ); } } xFilePicker->setCurrentFilter( sDefaultFilter ); @@ -1277,8 +1276,7 @@ bool UpdateRequiredDialog::isEnabled( const uno::Reference< deployment::XPackage } catch ( const uno::RuntimeException & ) { throw; } catch (const uno::Exception & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "desktop", exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "desktop", "" ); bRegistered = false; } diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index 65b4e1c0592c..0b6ab74848ad 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -337,8 +337,7 @@ PackageState TheExtensionManager::getPackageState( const uno::Reference< deploym throw; } catch (const uno::Exception &) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "desktop", exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "desktop", "" ); return NOT_AVAILABLE; } } diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 78473d35bff9..1f5475f0c937 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -1040,14 +1040,12 @@ PackageManagerImpl::getDeployedPackages_( ignore other platforms than the current one */ ) ); } catch (const lang::IllegalArgumentException &) { - css::uno::Any ex( cppu::getCaughtException() ); // ignore - SAL_WARN( "desktop", exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "desktop", "" ); } catch (const deployment::DeploymentException&) { - css::uno::Any ex( cppu::getCaughtException() ); // ignore - SAL_WARN( "desktop", exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "desktop", "" ); } } return comphelper::containerToSequence(packages); diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index c5475cae55a0..38f809c6a40f 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -846,7 +846,7 @@ void BackendImpl::PackageImpl::processPackage_( } catch (const Exception &) { - SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) ); + TOOLS_WARN_EXCEPTION( "desktop", "" ); // ignore any errors of rollback } } @@ -933,7 +933,7 @@ OUString BackendImpl::PackageImpl::getDescription() } catch ( const css::deployment::DeploymentException& ) { - SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) ); + TOOLS_WARN_EXCEPTION( "desktop", "" ); } } @@ -1055,10 +1055,10 @@ void BackendImpl::PackageImpl::exportTo( } // xxx todo: think about exception specs: catch (const deployment::DeploymentException &) { - SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) ); + TOOLS_WARN_EXCEPTION( "desktop", "" ); } - catch (const lang::IllegalArgumentException & exc) { - SAL_WARN( "desktop", exceptionToString(Any(exc)) ); + catch (const lang::IllegalArgumentException &) { + TOOLS_WARN_EXCEPTION( "desktop", "" ); } std::vector< Sequence > manifest; diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx index fb04a35bccda..cf4f425bb32f 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx @@ -122,8 +122,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl() xComp->dispose(); } catch (const RuntimeException &) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "desktop", exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "desktop", "" ); } } -- cgit v1.2.3