diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-14 15:29:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-15 12:24:53 +0200 |
commit | 4466466a5c57a0d19ad8559ac699cf073f7e3e97 (patch) | |
tree | dba94658e41dcad542edd2f3f36a7ae8c0744eb1 /cui/source/customize | |
parent | 5195c5bcd8be5f3b183659ead272cd86b8774cc1 (diff) |
loplugin:logexceptionnicely in cui
Change-Id: I0a3186b7f6d28725aff0e73d8f2cc4d5bc259a92
Reviewed-on: https://gerrit.libreoffice.org/74044
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/customize')
-rw-r--r-- | cui/source/customize/SvxToolbarConfigPage.cxx | 12 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 8 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 5 |
3 files changed, 13 insertions, 12 deletions
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index fde5b58dd58b..b49e349ba245 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -628,9 +628,9 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void) GetSaveInData()->PersistChanges( GetSaveInData()->GetImageManager() ); } - catch ( css::uno::Exception& e) + catch ( const css::uno::Exception&) { - SAL_WARN("cui.customize", "Error replacing image: " << e); + TOOLS_WARN_EXCEPTION("cui.customize", "Error replacing image"); } } } @@ -672,9 +672,9 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void) GetSaveInData()->PersistChanges( GetSaveInData()->GetImageManager() ); } - catch ( css::uno::Exception& e ) + catch ( const css::uno::Exception& ) { - SAL_WARN("cui.customize", "Error resetting image: " << e); + TOOLS_WARN_EXCEPTION("cui.customize", "Error resetting image"); } } else if (rIdent == "restoreItem") @@ -724,9 +724,9 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void) bNeedsApply = true; } - catch ( css::uno::Exception& e ) + catch ( const css::uno::Exception& ) { - SAL_WARN("cui.customize", "Error restoring image: " << e); + TOOLS_WARN_EXCEPTION("cui.customize", "Error restoring image"); } } else diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index d89aaa99acec..d9f3b6dca4c0 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -900,9 +900,9 @@ void ContextMenuSaveInData::Reset() { GetConfigManager()->removeSettings( pEntry->GetCommand() ); } - catch ( const css::uno::Exception& e ) + catch ( const css::uno::Exception& ) { - SAL_WARN("cui.customize", "Exception caught while resetting context menus: " << e); + TOOLS_WARN_EXCEPTION("cui.customize", "Exception caught while resetting context menus"); } } PersistChanges( GetConfigManager() ); @@ -915,9 +915,9 @@ void ContextMenuSaveInData::ResetContextMenu( const SvxConfigEntry* pEntry ) { GetConfigManager()->removeSettings( pEntry->GetCommand() ); } - catch ( const css::uno::Exception& e ) + catch ( const css::uno::Exception& ) { - SAL_WARN("cui.customize", "Exception caught while resetting context menu: " << e); + TOOLS_WARN_EXCEPTION("cui.customize", "Exception caught while resetting context menu"); } PersistChanges( GetConfigManager() ); m_pRootEntry.reset(); diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index c081a5e83394..7a58aa96ab77 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -58,6 +58,7 @@ #include <unotools/configmgr.hxx> #include <dialmgr.hxx> #include <svl/stritem.hxx> +#include <tools/diagnose_ex.h> #include <vcl/commandinfoprovider.hxx> #include <vcl/help.hxx> #include <vcl/svapp.hxx> @@ -649,9 +650,9 @@ void CuiConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get( m_xContext ); rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) ); } - catch( Exception& e ) + catch( const Exception& ) { - SAL_INFO("cui.customize", "Caught some exception whilst retrieving browse nodes from factory... Exception: " << e); + TOOLS_WARN_EXCEPTION("cui.customize", "Caught some exception whilst retrieving browse nodes from factory"); // TODO exception handling } |