From 13b6e5d50affa56cb9c449252227933ab0fa1268 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 16 Jun 2019 15:38:36 +0200 Subject: loplugin:logexceptionnicely in shell..sot Change-Id: I2ae0c0ac06f32ef91951aa4f7c98b5706178f841 Reviewed-on: https://gerrit.libreoffice.org/74115 Tested-by: Jenkins Reviewed-by: Noel Grandin --- shell/source/backends/desktopbe/desktopbackend.cxx | 5 +++-- shell/source/cmdmail/cmdmailsuppl.cxx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'shell/source') diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx index 14b22b033fb1..6b402a892427 100644 --- a/shell/source/backends/desktopbe/desktopbackend.cxx +++ b/shell/source/backends/desktopbe/desktopbackend.cxx @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -284,9 +285,9 @@ css::uno::Reference< css::uno::XInterface > createBackend( } catch (css::uno::RuntimeException &) { // Assuming these exceptions are real errors: throw; - } catch (const css::uno::Exception & e) { + } catch (const css::uno::Exception &) { // Assuming these exceptions indicate that the service is not installed: - SAL_WARN("shell", "createInstance(" << name << ") failed with " << e); + TOOLS_WARN_EXCEPTION("shell", "createInstance(" << name << ") failed"); return css::uno::Reference< css::uno::XInterface >(); } } diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index eb931f23b683..efbefb21cab0 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -198,10 +199,10 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM } - catch(const RuntimeException &e ) + catch(const RuntimeException & ) { + TOOLS_WARN_EXCEPTION("shell", "RuntimeException caught accessing configuration provider" ); m_xConfigurationProvider.clear(); - SAL_WARN("shell", "RuntimeException caught accessing configuration provider. " << e ); throw; } -- cgit