summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-15 13:11:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-16 08:55:07 +0200
commit7508c1d1e701dba8cb67414be59193d9672b66ab (patch)
tree5f37eecd6486a223f26b882ca8697fb9afecb9cc /framework/source
parentcf4059d59752de6e9a6eca59b388beef27bcd7e6 (diff)
loplugin:logexceptionnicely in filter..framework
Change-Id: I8cf70ee278c641767e3fcfcfd151d99d791b3468 Reviewed-on: https://gerrit.libreoffice.org/74098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/dispatch/servicehandler.cxx5
-rw-r--r--framework/source/fwi/jobs/configaccess.cxx5
-rw-r--r--framework/source/jobs/job.cxx5
-rw-r--r--framework/source/services/sessionlistener.cxx13
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx9
5 files changed, 21 insertions, 16 deletions
diff --git a/framework/source/dispatch/servicehandler.cxx b/framework/source/dispatch/servicehandler.cxx
index 35ef7daa70c9..d7d75328795e 100644
--- a/framework/source/dispatch/servicehandler.cxx
+++ b/framework/source/dispatch/servicehandler.cxx
@@ -27,6 +27,7 @@
#include <vcl/svapp.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace framework{
@@ -217,9 +218,9 @@ css::uno::Reference< css::uno::XInterface > ServiceHandler::implts_dispatch( con
// ignore all errors - inclusive runtime errors!
// E.g. a script based service (written in Python) could not be executed
// because it contains syntax errors, which was detected at runtime...
- catch(const css::uno::Exception& e)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("fwk.dispatch", "ignored " << e);
+ TOOLS_WARN_EXCEPTION("fwk.dispatch", "ignored");
xService.clear();
}
diff --git a/framework/source/fwi/jobs/configaccess.cxx b/framework/source/fwi/jobs/configaccess.cxx
index e61db20e18a6..14e46c58f787 100644
--- a/framework/source/fwi/jobs/configaccess.cxx
+++ b/framework/source/fwi/jobs/configaccess.cxx
@@ -31,6 +31,7 @@
#include <unotools/configpaths.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace framework{
@@ -127,9 +128,9 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode )
if (eMode==E_READWRITE)
m_xConfig = xConfigProvider->createInstanceWithArguments(SERVICENAME_CFGUPDATEACCESS, lParams);
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_INFO("fwk", "open config: " << ex);
+ TOOLS_INFO_EXCEPTION("fwk", "open config");
}
m_eMode = E_CLOSED;
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx
index e693c6eff38b..89347a6200ff 100644
--- a/framework/source/jobs/job.cxx
+++ b/framework/source/jobs/job.cxx
@@ -33,6 +33,7 @@
#include <comphelper/sequence.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
namespace framework{
@@ -214,9 +215,9 @@ void Job::execute( /*IN*/ const css::uno::Sequence< css::beans::NamedValue >& lD
}
}
#if OSL_DEBUG_LEVEL > 0
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_INFO("fwk", "Job::execute(): Got exception during job execution. Original Message was: \"" << ex << "\"");
+ TOOLS_INFO_EXCEPTION("fwk", "Job::execute(): Got exception during job execution");
}
#else
catch(const css::uno::Exception&)
diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx
index b1be64620b0f..db19346d7f76 100644
--- a/framework/source/services/sessionlistener.cxx
+++ b/framework/source/services/sessionlistener.cxx
@@ -24,6 +24,7 @@
#include <protocols.h>
#include <general.h>
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
#include <unotools/tempfile.hxx>
#include <com/sun/star/beans/NamedValue.hpp>
@@ -186,8 +187,8 @@ void SessionListener::StoreSession( bool bAsync )
Sequence< PropertyValue > args(1);
args[0] = PropertyValue("DispatchAsynchron",-1,makeAny(bAsync),PropertyState_DIRECT_VALUE);
xDispatch->dispatch(aURL, args);
- } catch (const css::uno::Exception& e) {
- SAL_WARN("fwk.session",e);
+ } catch (const css::uno::Exception&) {
+ TOOLS_WARN_EXCEPTION("fwk.session", "");
// save failed, but tell manager to go on if we haven't yet dispatched the request
// in case of synchronous saving the notification is done by the caller
if ( bAsync && m_rSessionManager.is() )
@@ -214,8 +215,8 @@ void SessionListener::QuitSessionQuietly()
Sequence< PropertyValue > args(1);
args[0] = PropertyValue("DispatchAsynchron",-1,makeAny(false),PropertyState_DIRECT_VALUE);
xDispatch->dispatch(aURL, args);
- } catch (const css::uno::Exception& e) {
- SAL_WARN("fwk.session",e);
+ } catch (const css::uno::Exception&) {
+ TOOLS_WARN_EXCEPTION("fwk.session", "");
}
}
@@ -302,8 +303,8 @@ sal_Bool SAL_CALL SessionListener::doRestore()
xDispatch->dispatch(aURL, args);
m_bRestored = true;
- } catch (const css::uno::Exception& e) {
- SAL_WARN("fwk.session",e);
+ } catch (const css::uno::Exception&) {
+ TOOLS_WARN_EXCEPTION("fwk.session", "");
}
return m_bRestored;
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 43333b925831..5e85bf7ddde7 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -29,6 +29,7 @@
#include <svtools/toolboxcontroller.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <unotools/moduleoptions.hxx>
#include <vcl/commandinfoprovider.hxx>
@@ -138,9 +139,9 @@ void SAL_CALL PopupMenuToolbarController::initialize(
m_bHasController = m_xPopupMenuFactory->hasController(
m_aPopupCommand, getModuleName() );
}
- catch (const css::uno::Exception& e)
+ catch (const css::uno::Exception&)
{
- SAL_INFO( "fwk.uielement", e );
+ TOOLS_INFO_EXCEPTION( "fwk.uielement", "" );
}
SolarMutexGuard aSolarLock;
@@ -245,10 +246,10 @@ void PopupMenuToolbarController::createPopupMenuController()
m_xPopupMenuController->setPopupMenu( m_xPopupMenu );
}
- catch ( const css::uno::Exception &e )
+ catch ( const css::uno::Exception & )
{
+ TOOLS_INFO_EXCEPTION( "fwk.uielement", "" );
m_xPopupMenu.clear();
- SAL_INFO( "fwk.uielement", e );
}
}
}