From cdcc2f365b6f9b88bd9d5dfd4e7c7131599f62ec Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 14 Jun 2019 09:31:44 +0200 Subject: loplugin:logexceptionnicely in accessibility..basic Change-Id: I6e0b95b40e3d62db36352f3ea916f79f3dbc9084 Reviewed-on: https://gerrit.libreoffice.org/74018 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/basmgr/basmgr.cxx | 8 ++++---- basic/source/classes/eventatt.cxx | 9 +++++---- basic/source/uno/namecont.cxx | 16 ++++++++-------- 3 files changed, 17 insertions(+), 16 deletions(-) (limited to 'basic/source') diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 31a799eb9191..88e12775f6ce 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1129,9 +1129,9 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage ) xStorage = new SotStorage(false, (*itLibInfo)->GetStorageName()); } } - catch (const css::ucb::ContentCreationException& e) + catch (const css::ucb::ContentCreationException&) { - SAL_WARN("basic", "BasicManager::RemoveLib: " << e); + TOOLS_WARN_EXCEPTION("basic", "BasicManager::RemoveLib:"); } if (xStorage.is() && xStorage->IsStorage(szBasicStorage)) @@ -1316,9 +1316,9 @@ StarBASIC* BasicManager::CreateLib( const OUString& rLibName, const OUString& Pa pLib = AddLib(*xStorage, rLibName, true); } } - catch (const css::ucb::ContentCreationException& e) + catch (const css::ucb::ContentCreationException&) { - SAL_WARN("basic", "BasicManager::RemoveLib: " << e); + TOOLS_WARN_EXCEPTION("basic", "BasicManager::RemoveLib:"); } DBG_ASSERT( pLib, "XML Import: Linked basic library could not be loaded"); } diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 313d4a9f9ae1..5df743ab4589 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -118,13 +119,13 @@ void SFURL_firing_impl( const ScriptEvent& aScriptEvent, Any* pRet, const Refere *pRet = result; } } - catch ( const RuntimeException& re ) + catch ( const RuntimeException& ) { - SAL_INFO("basic", "Caught RuntimeException reason " << re); + TOOLS_INFO_EXCEPTION("basic", "" ); } - catch ( const Exception& e ) + catch ( const Exception& ) { - SAL_INFO("basic", "Caught Exception reason " << e); + TOOLS_INFO_EXCEPTION("basic", "" ); } } diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 080d35a6027d..95a05bca652c 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -419,9 +419,9 @@ BasicManager* SfxLibraryContainer::getBasicManager() mpBasMgr = BasicManagerRepository::getDocumentBasicManager( xDocument ); } } - catch (const css::ucb::ContentCreationException& e) + catch (const css::ucb::ContentCreationException&) { - SAL_WARN( "basic", "SfxLibraryContainer::getBasicManager: " << e ); + TOOLS_WARN_EXCEPTION( "basic", "SfxLibraryContainer::getBasicManager:" ); } return mpBasMgr; } @@ -806,14 +806,14 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, xParser->setDocumentHandler( ::xmlscript::importLibraryContainer( pLibArray.get() ) ); xParser->parseStream( source ); } - catch ( const xml::sax::SAXException& e ) + catch ( const xml::sax::SAXException& ) { - SAL_WARN("basic", e); + TOOLS_WARN_EXCEPTION( "basic", "" ); return; } - catch ( const io::IOException& e ) + catch ( const io::IOException& ) { - SAL_WARN("basic", e); + TOOLS_WARN_EXCEPTION( "basic", "" ); return; } @@ -1174,10 +1174,10 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, mxSFI->kill( aPrevFolder ); } } - catch(const Exception& e) + catch(const Exception&) { + TOOLS_WARN_EXCEPTION("basic", "Upgrade of Basic installation failed somehow" ); bCleanUp = true; - SAL_WARN("basic", "Upgrade of Basic installation failed somehow: " << e); } // #i93163 -- cgit