[Libreoffice-commits] core.git: 3 commits - linguistic/source oox/source package/Library_package2.mk package/source reportdesign/source sc/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sat Jun 15 17:59:17 UTC 2019


 linguistic/source/gciterator.cxx                   |    6 
 oox/source/drawingml/shape.cxx                     |   17 
 oox/source/drawingml/textfield.cxx                 |    4 
 oox/source/export/chartexport.cxx                  |    9 
 oox/source/export/drawingml.cxx                    |    6 
 oox/source/export/shapes.cxx                       |   17 
 oox/source/helper/propertyset.cxx                  |   13 
 oox/source/helper/zipstorage.cxx                   |   35 -
 oox/source/ole/axcontrol.cxx                       |   23 
 oox/source/ppt/timenode.cxx                        |   13 
 oox/source/vml/vmldrawing.cxx                      |    4 
 package/Library_package2.mk                        |    1 
 package/source/manifest/ManifestReader.cxx         |   13 
 package/source/xstor/owriteablestream.cxx          |  115 +--
 package/source/xstor/xstorage.cxx                  |  703 ++++++++++-----------
 package/source/zipapi/XUnbufferedStream.cxx        |    5 
 package/source/zippackage/ZipPackageStream.cxx     |    5 
 reportdesign/source/filter/xml/xmlfilter.cxx       |    7 
 reportdesign/source/ui/report/ReportController.cxx |    4 
 sc/source/filter/excel/xlroot.cxx                  |    5 
 sc/source/ui/docshell/docsh8.cxx                   |    4 
 sc/source/ui/drawfunc/fuins2.cxx                   |    8 
 sc/source/ui/miscdlgs/solverutil.cxx               |    5 
 sc/source/ui/unoobj/docuno.cxx                     |    1 
 sc/source/ui/unoobj/exceldetect.cxx                |    5 
 sc/source/ui/vba/vbarange.cxx                      |    5 
 26 files changed, 515 insertions(+), 518 deletions(-)

New commits:
commit 5c43a91db2c2759ae52faf3b80159beb0a1257d9
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Jun 15 13:13:25 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jun 15 19:58:11 2019 +0200

    loplugin:logexceptionnicely in sc
    
    Change-Id: Icaa476206312a5f81896f59fa8109448a8ea8963
    Reviewed-on: https://gerrit.libreoffice.org/74101
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index a1cdf88b5f45..7d054c52204c 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -34,6 +34,7 @@
 #include <sfx2/sfxsids.hrc>
 #include <vcl/font.hxx>
 #include <vcl/settings.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <editeng/editstat.hxx>
 #include <scitems.hxx>
@@ -151,9 +152,9 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
         mfScreenPixelX = (aDeviceInfo.PixelPerMeterX > 0) ? (100000.0 / aDeviceInfo.PixelPerMeterX) : 50.0;
         mfScreenPixelY = (aDeviceInfo.PixelPerMeterY > 0) ? (100000.0 / aDeviceInfo.PixelPerMeterY) : 50.0;
     }
-    catch( const Exception& e)
+    catch( const Exception&)
     {
-        SAL_WARN( "sc", "XclRootData::XclRootData - cannot get output device info: " << e );
+        TOOLS_WARN_EXCEPTION( "sc", "XclRootData::XclRootData - cannot get output device info");
     }
 }
 
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index bf2c490b41c9..8705b5bc8c3b 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -33,6 +33,7 @@
 #include <rtl/tencinfo.h>
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <com/sun/star/sdbc/DataType.hpp>
@@ -985,8 +986,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding
     catch ( const sdbc::SQLException& aException )
     {
         sal_Int32 nError = aException.ErrorCode;
-        SAL_WARN("sc", "ScDocShell::DBaseExport: SQLException ErrorCode: " << nError << ", SQLState: " << aException.SQLState <<
-            ", Message: " << aException);
+        TOOLS_WARN_EXCEPTION("sc", "ScDocShell::DBaseExport");
 
         if (nError == 22018 || nError == 22001)
         {
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index ce2860bd149a..c062c0c8f936 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -41,6 +41,7 @@
 #include <sfx2/msg.hxx>
 #include <scmod.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <comphelper/storagehelper.hxx>
 #include <comphelper/propertysequence.hxx>
@@ -194,14 +195,13 @@ void lcl_ChartInit(const uno::Reference <embed::XEmbeddedObject>& xObj, ScViewDa
             {
                 xReceiver->setArguments( aArgs );
             }
-            catch (const lang::IllegalArgumentException& e)
+            catch (const lang::IllegalArgumentException&)
             {
                 // Can happen for invalid aRangeString, in which case a Chart
                 // will be created nevertheless and the range string can be
                 // edited.
-                SAL_WARN("sc.ui",
-                        "lcl_ChartInit - caught IllegalArgumentException with message \"" << e << "\","
-                        " might be due to aRangeString: " << aRangeString);
+                TOOLS_WARN_EXCEPTION("sc.ui",
+                        "lcl_ChartInit - caught IllegalArgumentException might be due to aRangeString: " << aRangeString);
             }
 
             // don't create chart listener here (range may be modified in chart dialog)
diff --git a/sc/source/ui/miscdlgs/solverutil.cxx b/sc/source/ui/miscdlgs/solverutil.cxx
index 64a982598815..3cddf1effbd5 100644
--- a/sc/source/ui/miscdlgs/solverutil.cxx
+++ b/sc/source/ui/miscdlgs/solverutil.cxx
@@ -30,6 +30,7 @@
 #include <osl/diagnose.h>
 #include <comphelper/processfactory.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 using namespace com::sun::star;
 
@@ -83,9 +84,9 @@ void ScSolverUtil::GetImplementations( uno::Sequence<OUString>& rImplNames,
                             rDescriptions[nCount] = sDescription;
                             ++nCount;
                         }
-                        catch (const css::uno::Exception& e)
+                        catch (const css::uno::Exception&)
                         {
-                            SAL_INFO("sc.ui", "ScSolverUtil::GetImplementations: cannot instantiate: " << sName << ", because: " << e);
+                            TOOLS_INFO_EXCEPTION("sc.ui", "ScSolverUtil::GetImplementations: cannot instantiate: " << sName);
                         }
                     }
                 }
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 3c399a6bc8ec..119683f8a9a2 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -31,6 +31,7 @@
 #include <svx/svdpage.hxx>
 #include <svx/svxids.hrc>
 #include <svx/unoshape.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 #include <comphelper/propertysequence.hxx>
diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx
index 7d3d817f708e..4cb287e607d0 100644
--- a/sc/source/ui/unoobj/exceldetect.cxx
+++ b/sc/source/ui/unoobj/exceldetect.cxx
@@ -23,6 +23,7 @@
 #include <unotools/mediadescriptor.hxx>
 #include <sot/storage.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 using namespace com::sun::star;
 using utl::MediaDescriptor;
@@ -73,9 +74,9 @@ bool hasStream(const uno::Reference<io::XInputStream>& xInStream, const OUString
             return false;
         return xStorage->IsStream(rName);
     }
-    catch (const css::ucb::ContentCreationException &e)
+    catch (const css::ucb::ContentCreationException &)
     {
-        SAL_WARN("sc", "hasStream caught " << e);
+        TOOLS_WARN_EXCEPTION("sc", "hasStream");
     }
 
     return false;
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 42b3ea9300d6..dfe74c5f694e 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -26,6 +26,7 @@
 #include <o3tl/any.hxx>
 #include <sfx2/objsh.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <com/sun/star/script/ArrayWrapper.hpp>
 #include <com/sun/star/script/XTypeConverter.hpp>
@@ -1550,9 +1551,9 @@ ScVbaRange::setValue( const uno::Any& aValue, ValueSetter& valueSetter )
                 visitArray( setter );
             }
         }
-        catch ( const uno::Exception& e )
+        catch ( const uno::Exception& )
         {
-            SAL_WARN("sc", "Bahhh, caught " << e );
+            TOOLS_WARN_EXCEPTION("sc", "Bahhh, caught" );
         }
     }
     else
commit 48f62672abd1c594c2c4132c36ae80ffe346ae8b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Jun 15 13:13:11 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jun 15 19:58:07 2019 +0200

    loplugin:logexceptionnicely in package..reportdesign
    
    Change-Id: Ib5438d346fa95299848aaf2144e54f5551c0a906
    Reviewed-on: https://gerrit.libreoffice.org/74100
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/package/Library_package2.mk b/package/Library_package2.mk
index 195c87f9ff4b..d0df0201e59b 100644
--- a/package/Library_package2.mk
+++ b/package/Library_package2.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_Library_use_libraries,package2,\
 	sax \
 	salhelper \
 	ucbhelper \
+	tl \
 	utl \
 ))
 
diff --git a/package/source/manifest/ManifestReader.cxx b/package/source/manifest/ManifestReader.cxx
index 27d3ab00fd18..af32ddb5ae97 100644
--- a/package/source/manifest/ManifestReader.cxx
+++ b/package/source/manifest/ManifestReader.cxx
@@ -20,6 +20,7 @@
 #include "ManifestReader.hxx"
 #include "ManifestImport.hxx"
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/factory.hxx>
@@ -63,17 +64,17 @@ Sequence< Sequence< PropertyValue > > SAL_CALL ManifestReader::readManifestSeque
         xParser->parseStream( aParserInput );
         aManifestSequence = comphelper::containerToSequence(aManVector);
     }
-    catch (SAXParseException& e)
+    catch (const SAXParseException&)
     {
-        SAL_WARN("package", "ignoring " << e);
+        TOOLS_WARN_EXCEPTION("package", "ignoring");
     }
-    catch (SAXException& e)
+    catch (const SAXException&)
     {
-        SAL_WARN("package", "ignoring " << e);
+        TOOLS_WARN_EXCEPTION("package", "ignoring");
     }
-    catch (IOException& e)
+    catch (const IOException&)
     {
-        SAL_WARN("package", "ignoring " << e);
+        TOOLS_WARN_EXCEPTION("package", "ignoring");
     }
     xParser->setDocumentHandler ( Reference < XDocumentHandler > () );
     return aManifestSequence;
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index b9ea32c3ed70..397bd6c798fa 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -117,11 +117,9 @@ void SetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >&
     try {
         xPropertySet->setPropertyValue( STORAGE_ENCRYPTION_KEYS_PROPERTY, uno::makeAny( aKey ) );
     }
-    catch ( const uno::Exception& rException )
+    catch ( const uno::Exception& )
     {
-        SAL_INFO("package.xstor", rException);
-        SAL_INFO("package.xstor", "Can't set encryption");
-        SAL_WARN( "package.xstor", "Can't write encryption related properties!" );
+        TOOLS_WARN_EXCEPTION( "package.xstor", "Can't write encryption related properties");
         throw io::IOException(); // TODO
     }
 }
@@ -135,12 +133,9 @@ uno::Any GetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySe
     try {
         return xPropertySet->getPropertyValue(STORAGE_ENCRYPTION_KEYS_PROPERTY);
     }
-    catch ( const uno::Exception& rException )
+    catch ( const uno::Exception& )
     {
-        SAL_INFO("package.xstor", rException);
-        SAL_INFO("package.xstor", "Can't get encryption property");
-
-        SAL_WARN( "package.xstor", "Can't get encryption related properties!" );
+        TOOLS_WARN_EXCEPTION( "package.xstor", "Can't get encryption related properties");
         throw io::IOException(); // TODO
     }
 }
@@ -219,10 +214,9 @@ bool KillFile( const OUString& aURL, const uno::Reference< uno::XComponentContex
         xAccess->kill( aURL );
         bRet = true;
     }
-    catch( const uno::Exception& rException )
+    catch( const uno::Exception& )
     {
-        SAL_INFO("package.xstor", rException);
-        SAL_INFO("package.xstor", "Quiet exception");
+        TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
     }
 
     return bRet;
@@ -241,10 +235,9 @@ OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext >& rCon
         uno::Any aUrl = xTempFile->getPropertyValue( "Uri" );
         aUrl >>= aTempURL;
     }
-    catch ( const uno::Exception& rException )
+    catch ( const uno::Exception& )
     {
-        SAL_INFO("package.xstor", rException);
-        SAL_INFO("package.xstor", "Quiet exception");
+        TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
     }
 
     if ( aTempURL.isEmpty() )
@@ -471,9 +464,9 @@ void OWriteStream_Impl::DisposeWrappers()
         try {
             m_pAntiImpl->dispose();
         }
-        catch ( const uno::RuntimeException& rRuntimeException )
+        catch ( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Quiet exception: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
         }
 
         m_pAntiImpl = nullptr;
@@ -515,15 +508,15 @@ OUString const & OWriteStream_Impl::GetFilledTempFileIfNo( const uno::Reference<
                 xTempOutStream.clear();
             }
         }
-        catch( const packages::WrongPasswordException& rWrongPasswordException )
+        catch( const packages::WrongPasswordException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rWrongPasswordException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             KillFile( aTempURL, comphelper::getProcessComponentContext() );
             throw;
         }
-        catch( const uno::Exception& rException )
+        catch( const uno::Exception& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             KillFile( aTempURL, comphelper::getProcessComponentContext() );
             throw;
         }
@@ -632,9 +625,9 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetTempFileAsStream()
             {
                 xTempStream = xTempAccess->openFileReadWrite( m_aTempURL );
             }
-            catch( const uno::Exception& rException )
+            catch( const uno::Exception& )
             {
-                SAL_INFO("package.xstor", "Quiet exception: " << rException);
+                TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
             }
         }
     }
@@ -669,9 +662,9 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetTempFileAsInputStream()
             {
                 xInputStream = xTempAccess->openFileRead( m_aTempURL );
             }
-            catch( const uno::Exception& rException )
+            catch( const uno::Exception& )
             {
-                SAL_INFO("package.xstor", "Quiet exception: " << rException);
+                TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
             }
         }
     }
@@ -1007,9 +1000,9 @@ void OWriteStream_Impl::ReadRelInfoIfNecessary()
             m_xOrigRelInfoStream.clear();
             m_nRelInfoStatus = RELINFO_READ;
         }
-        catch( const uno::Exception& rException )
+        catch( const uno::Exception& )
         {
-            SAL_INFO("package.xstor", "Quiet exception: " << rException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
 
             m_nRelInfoStatus = RELINFO_BROKEN;
             m_bOrigRelInfoBroken = true;
@@ -1072,10 +1065,9 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::ReadPackageStreamProper
         try {
             aResult[nInd].Value = xPropSet->getPropertyValue( aResult[nInd].Name );
         }
-        catch( const uno::Exception& rException )
+        catch( const uno::Exception& )
         {
-            SAL_INFO("package.xstor", "Quiet exception: " << rException);
-            SAL_WARN( "package.xstor", "A property can't be retrieved!" );
+            TOOLS_WARN_EXCEPTION( "package.xstor", "A property can't be retrieved" );
         }
     }
 
@@ -1178,16 +1170,15 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
             m_bHasCachedEncryptionData = true;
             m_aEncryptionData = aEncryptionData;
         }
-        catch( const packages::WrongPasswordException& rWrongPasswordException )
+        catch( const packages::WrongPasswordException& )
         {
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             SetEncryptionKeyProperty_Impl( xPropertySet, uno::Sequence< beans::NamedValue >() );
-            SAL_INFO("package.xstor", "Rethrow: " << rWrongPasswordException);
             throw;
         }
-        catch ( const uno::Exception& rException )
+        catch ( const uno::Exception& )
         {
-            SAL_INFO("package.xstor", "Quiet exception: " << rException);
-            SAL_WARN( "package.xstor", "Can't write encryption related properties!" );
+            TOOLS_WARN_EXCEPTION( "package.xstor", "Can't write encryption related properties");
             SetEncryptionKeyProperty_Impl( xPropertySet, uno::Sequence< beans::NamedValue >() );
             throw io::IOException(); // TODO:
         }
@@ -1216,9 +1207,9 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
         {
             aGlobalEncryptionData = GetCommonRootEncryptionData();
         }
-        catch( const packages::NoEncryptionException& rNoEncryptionException )
+        catch( const packages::NoEncryptionException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rNoEncryptionException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw packages::WrongPasswordException();
         }
 
@@ -1435,9 +1426,9 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar
         {
             aGlobalEncryptionData = GetCommonRootEncryptionData();
         }
-        catch( const packages::NoEncryptionException& rNoEncryptionException )
+        catch( const packages::NoEncryptionException& )
         {
-            SAL_INFO("package.xstor", "No Element: " << rNoEncryptionException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "No Element");
             throw packages::WrongPasswordException();
         }
 
@@ -1502,11 +1493,10 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar
                 SetEncryptionKeyProperty_Impl( xPropertySet, uno::Sequence< beans::NamedValue >() );
             }
         }
-        catch( const uno::Exception& rException )
+        catch( const uno::Exception& )
         {
-            SAL_WARN( "package.xstor", "Can't open encrypted stream!" );
+            TOOLS_WARN_EXCEPTION( "package.xstor", "Can't open encrypted stream");
             SetEncryptionKeyProperty_Impl( xPropertySet, uno::Sequence< beans::NamedValue >() );
-            SAL_INFO("package.xstor", "Rethrow: " << rException);
             throw;
         }
 
@@ -1670,9 +1660,9 @@ OWriteStream::~OWriteStream()
         try {
             dispose();
         }
-        catch( const uno::RuntimeException& rRuntimeException )
+        catch( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Quiet exception: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
         }
     }
 }
@@ -1753,11 +1743,10 @@ void OWriteStream::CopyToStreamInternally_Impl( const uno::Reference< io::XStrea
     try {
         m_xSeekable->seek( nCurPos );
     }
-    catch ( const uno::Exception& rException )
+    catch ( const uno::Exception& )
     {
-        SAL_INFO("package.xstor", "Quiet exception: " << rException);
         // TODO: set the stream in invalid state or dispose
-        SAL_WARN( "package.xstor", "The stream become invalid during copiing!" );
+        TOOLS_WARN_EXCEPTION( "package.xstor", "The stream become invalid during copying" );
         throw uno::RuntimeException();
     }
 
@@ -2481,9 +2470,9 @@ sal_Bool SAL_CALL OWriteStream::hasEncryptionData()
         if (!bRet && m_pImpl->m_bUseCommonEncryption && m_pImpl->m_pParent)
             bRet = m_pImpl->m_pParent->m_bHasCommonEncryptionData;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -2516,9 +2505,9 @@ sal_Bool SAL_CALL OWriteStream::hasByID(  const OUString& sID )
         getRelationshipByID( sID );
         return true;
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "No Element: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "No Element");
     }
 
     return false;
@@ -3151,19 +3140,19 @@ void SAL_CALL OWriteStream::commit()
         // when the storage is committed the parent is modified
         ModifyParentUnlockMutex_Impl( aGuard );
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -3207,19 +3196,19 @@ void SAL_CALL OWriteStream::revert()
         try {
             m_pImpl->Revert();
         }
-        catch (const io::IOException& rIOException)
+        catch (const io::IOException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const embed::StorageWrappedTargetException& rStorageWrappedTargetException)
+        catch (const embed::StorageWrappedTargetException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const uno::RuntimeException& rRuntimeException)
+        catch (const uno::RuntimeException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
         catch (const uno::Exception&)
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index ec8275ae445d..fb5ad128dd41 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -296,9 +296,9 @@ OStorage_Impl::~OStorage_Impl()
             try {
                 m_pAntiImpl->InternalDispose( false );
             }
-            catch ( const uno::Exception& rException )
+            catch ( const uno::Exception& )
             {
-                SAL_INFO("package.xstor", "Quiet exception: " << rException);
+                TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
             }
             m_pAntiImpl = nullptr;
         }
@@ -310,9 +310,9 @@ OStorage_Impl::~OStorage_Impl()
                 if ( xTmp.is() )
                     try {
                         rStorage.m_pPointer->InternalDispose( false );
-                    } catch( const uno::Exception& rException )
+                    } catch( const uno::Exception& )
                     {
-                        SAL_INFO("package.xstor", "Quiet exception: " << rException);
+                        TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
                     }
             }
 
@@ -366,9 +366,9 @@ OStorage_Impl::~OStorage_Impl()
                     m_xStream.clear();
                 }
             }
-            catch (const uno::Exception& rException)
+            catch (const uno::Exception&)
             {
-                SAL_INFO("package.xstor", "Quiet exception: " << rException);
+                TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
             }
         }
     }
@@ -391,9 +391,9 @@ void OStorage_Impl::RemoveReadOnlyWrap( OStorage& aStorage )
         {
             try {
                 pStorageIter->m_pPointer->InternalDispose( false );
-            } catch( const uno::Exception& rException )
+            } catch( const uno::Exception& )
             {
-                SAL_INFO("package.xstor", "Quiet exception: " << rException);
+                TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
             }
 
             pStorageIter = m_aReadOnlyWrapVector.erase(pStorageIter);
@@ -538,9 +538,9 @@ void OStorage_Impl::ReadRelInfoIfNecessary()
                                     m_xContext );
             m_nRelInfoStatus = RELINFO_READ;
         }
-        catch (css::uno::Exception & e)
+        catch (css::uno::Exception &)
         {
-            SAL_INFO("package.xstor", "caught " << e);
+            TOOLS_INFO_EXCEPTION("package.xstor", "");
         }
     }
     else if ( m_nRelInfoStatus == RELINFO_CHANGED_STREAM )
@@ -617,9 +617,9 @@ void OStorage_Impl::ReadContents()
                 m_aChildrenMap[aName].push_back(xNewElement.release());
             }
         }
-        catch( const container::NoSuchElementException& rNoSuchElementException )
+        catch( const container::NoSuchElementException& )
         {
-            SAL_WARN( "package.xstor", "hasMoreElements() implementation has problems! " << rNoSuchElementException);
+            TOOLS_WARN_EXCEPTION( "package.xstor", "hasMoreElements() implementation has problems!");
             break;
         }
     }
@@ -691,9 +691,9 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes
                     xEncr->setEncryptionAlgorithms( aAlgorithms );
                 }
             }
-            catch( const packages::NoEncryptionException& rNoEncryptionException )
+            catch( const packages::NoEncryptionException& )
             {
-                SAL_INFO("package.xstor", "No Encryption: " << rNoEncryptionException);
+                TOOLS_INFO_EXCEPTION("package.xstor", "No Encryption");
             }
         }
     }
@@ -855,9 +855,9 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
                 aCommonEncryptionData = GetCommonRootEncryptionData();
                 bHasCommonEncryptionData = true;
             }
-            catch( const packages::NoEncryptionException& rNoEncryptionException )
+            catch( const packages::NoEncryptionException& )
             {
-                SAL_INFO("package.xstor", "No Encryption: " << rNoEncryptionException);
+                TOOLS_INFO_EXCEPTION("package.xstor", "No Encryption");
             }
 
             if (bHasCommonEncryptionData && ::package::PackageEncryptionDatasEqual(pElement->m_xStream->GetCachedEncryptionData(), aCommonEncryptionData))
@@ -909,9 +909,9 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
                     "UseCommonStoragePasswordEncryption",
                     uno::Any( true ) );
             }
-            catch( const packages::WrongPasswordException& rWrongPasswordException )
+            catch( const packages::WrongPasswordException& )
             {
-                SAL_INFO("package.xstor", "Handled exception: " << rWrongPasswordException);
+                TOOLS_INFO_EXCEPTION("package.xstor", "Handled exception");
 
                 // If the common storage password does not allow to open the stream
                 // it could be copied in raw way, the problem is that the StartKey should be the same
@@ -1190,6 +1190,7 @@ void OStorage_Impl::Commit()
         }
         catch( const lang::WrappedTargetException& r )
         {
+            css::uno::Any ex( cppu::getCaughtException() );
             // the wrapped UseBackupException means that the target medium can be corrupted
             embed::UseBackupException aException;
             if ( r.TargetException >>= aException )
@@ -1199,7 +1200,7 @@ void OStorage_Impl::Commit()
                 throw aException;
             }
 
-            SAL_INFO("package.xstor", "Rethrow: " << aException);
+            SAL_INFO("package.xstor", "Rethrow: " << exceptionToString(ex));
             throw;
         }
     }
@@ -1813,9 +1814,9 @@ OStorage::~OStorage()
         try {
             dispose();
         }
-        catch( const uno::RuntimeException& rRuntimeException )
+        catch( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Handled exception: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Handled exception");
         }
     }
 }
@@ -1864,9 +1865,9 @@ void OStorage::InternalDispose( bool bNotifyImpl )
 
                         try {
                             xTmp->dispose();
-                        } catch( const uno::Exception& rException )
+                        } catch( const uno::Exception& )
                         {
-                            SAL_INFO("package.xstor", "Quiet exception: " << rException);
+                            TOOLS_INFO_EXCEPTION("package.xstor", "Quiet exception");
                         }
                     }
                 }
@@ -2206,29 +2207,29 @@ void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >&
     try {
         m_pImpl->CopyToStorage( xDest, false );
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -2278,34 +2279,34 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
             MakeLinkToSubComponent_Impl( xStreamComponent );
         }
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const packages::WrongPasswordException& rWrongPasswordException )
+    catch( const packages::WrongPasswordException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rWrongPasswordException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -2425,29 +2426,29 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
             MakeLinkToSubComponent_Impl( xStorageComponent );
         }
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -2487,34 +2488,34 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr
             throw uno::RuntimeException( THROW_WHERE );
         return xResult;
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const packages::WrongPasswordException& rWrongPasswordException )
+    catch( const packages::WrongPasswordException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rWrongPasswordException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -2550,29 +2551,29 @@ void SAL_CALL OStorage::copyLastCommitTo(
     {
         m_pImpl->CopyLastCommitTo( xTargetStorage );
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -2629,29 +2630,29 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo(
 
         pElement->m_xStorage->CopyLastCommitTo(xTargetStorage);
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -2687,24 +2688,24 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName )
     {
         pElement = m_pImpl->FindElement( aElementName );
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -2745,24 +2746,24 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName )
     {
         pElement = m_pImpl->FindElement( aElementName );
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -2815,34 +2816,34 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName )
             m_pImpl->m_bIsModified = true;
             m_pImpl->m_bBroadcastModified = true;
         }
-        catch (const embed::InvalidStorageException& rInvalidStorageException)
+        catch (const embed::InvalidStorageException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const lang::IllegalArgumentException& rIllegalArgumentException)
+        catch (const lang::IllegalArgumentException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const container::NoSuchElementException& rNoSuchElementException)
+        catch (const container::NoSuchElementException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const io::IOException& rIOException)
+        catch (const io::IOException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const embed::StorageWrappedTargetException& rStorageWrappedTargetException)
+        catch (const embed::StorageWrappedTargetException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const uno::RuntimeException& rRuntimeException)
+        catch (const uno::RuntimeException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
         catch (const uno::Exception&)
@@ -2908,39 +2909,39 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr
             m_pImpl->m_bIsModified = true;
             m_pImpl->m_bBroadcastModified = true;
         }
-        catch (const embed::InvalidStorageException& rInvalidStorageException)
+        catch (const embed::InvalidStorageException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const lang::IllegalArgumentException& rIllegalArgumentException)
+        catch (const lang::IllegalArgumentException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const container::NoSuchElementException& rNoSuchElementException)
+        catch (const container::NoSuchElementException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const container::ElementExistException& rElementExistException)
+        catch (const container::ElementExistException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rElementExistException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const io::IOException& rIOException)
+        catch (const io::IOException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const embed::StorageWrappedTargetException& rStorageWrappedTargetException)
+        catch (const embed::StorageWrappedTargetException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const uno::RuntimeException& rRuntimeException)
+        catch (const uno::RuntimeException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
         catch (const uno::Exception&)
@@ -2991,39 +2992,39 @@ void SAL_CALL OStorage::copyElementTo(  const OUString& aElementName,
 
         m_pImpl->CopyStorageElement( pElement, xDest, aNewName, false );
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const container::ElementExistException& rElementExistException )
+    catch( const container::ElementExistException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rElementExistException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -3088,39 +3089,39 @@ void SAL_CALL OStorage::moveElementTo(  const OUString& aElementName,
             m_pImpl->m_bIsModified = true;
             m_pImpl->m_bBroadcastModified = true;
         }
-        catch (const embed::InvalidStorageException& rInvalidStorageException)
+        catch (const embed::InvalidStorageException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const lang::IllegalArgumentException& rIllegalArgumentException)
+        catch (const lang::IllegalArgumentException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const container::NoSuchElementException& rNoSuchElementException)
+        catch (const container::NoSuchElementException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const container::ElementExistException& rElementExistException)
+        catch (const container::ElementExistException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rElementExistException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const embed::StorageWrappedTargetException& rStorageWrappedTargetException)
+        catch (const embed::StorageWrappedTargetException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const io::IOException& rIOException)
+        catch (const io::IOException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
-        catch (const uno::RuntimeException& rRuntimeException)
+        catch (const uno::RuntimeException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
             throw;
         }
         catch (const uno::Exception&)
@@ -3170,39 +3171,39 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
             MakeLinkToSubComponent_Impl( xStreamComponent );
         }
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const packages::NoEncryptionException& rNoEncryptionException )
+    catch( const packages::NoEncryptionException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoEncryptionException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const packages::WrongPasswordException& rWrongPasswordException )
+    catch( const packages::WrongPasswordException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rWrongPasswordException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -3245,39 +3246,39 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
             throw uno::RuntimeException( THROW_WHERE );
         return xResult;
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const packages::NoEncryptionException& rNoEncryptionException )
+    catch( const packages::NoEncryptionException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoEncryptionException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const packages::WrongPasswordException& rWrongPasswordException )
+    catch( const packages::WrongPasswordException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rWrongPasswordException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -3340,34 +3341,34 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
         xTempOut->closeOutput();
         xSeek->seek( 0 );
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -3435,39 +3436,39 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
         xSeek->seek( 0 );
 
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const packages::NoEncryptionException& rNoEncryptionException )
+    catch( const packages::NoEncryptionException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoEncryptionException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow");
         throw;
     }
     catch( const uno::Exception& )
@@ -3514,39 +3515,39 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName,
 
         m_pImpl->InsertRawStream( aStreamName, xInStream );
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const packages::NoRawFormatException& rNoRawFormatException )
+    catch( const packages::NoRawFormatException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoRawFormatException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const container::ElementExistException& rElementExistException )
+    catch( const container::ElementExistException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rElementExistException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -3585,19 +3586,19 @@ void SAL_CALL OStorage::commit()
         if ( m_pImpl->m_pParent && m_pImpl->m_pParent->m_pAntiImpl )
             xParentModif = static_cast<util::XModifiable*>(m_pImpl->m_pParent->m_pAntiImpl);
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -3654,19 +3655,19 @@ void SAL_CALL OStorage::revert()
             m_pImpl->m_bIsModified = false;
             m_pImpl->m_bBroadcastModified = true;
         }
-        catch (const io::IOException& rIOException)
+        catch (const io::IOException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
-        catch (const embed::StorageWrappedTargetException& rStorageWrappedTargetException)
+        catch (const embed::StorageWrappedTargetException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
-        catch (const uno::RuntimeException& rRuntimeException)
+        catch (const uno::RuntimeException&)
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
         catch (const uno::Exception&)
@@ -3818,19 +3819,19 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
         else
             aResult <<= openStreamElement( aName, embed::ElementModes::READ );
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const lang::WrappedTargetException& rWrappedTargetException )
+    catch( const lang::WrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -3860,9 +3861,9 @@ uno::Sequence< OUString > SAL_CALL OStorage::getElementNames()
     {
         return m_pImpl->GetElementNames();
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch ( const uno::Exception& )
@@ -3897,9 +3898,9 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
     {
         pElement = m_pImpl->FindElement( aName );
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch ( const uno::Exception& )
@@ -3943,9 +3944,9 @@ sal_Bool SAL_CALL OStorage::hasElements()
     {
         return m_pImpl->HasChildren();
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -3974,9 +3975,9 @@ void SAL_CALL OStorage::dispose()
     {
         InternalDispose( true );
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -4046,9 +4047,9 @@ void SAL_CALL OStorage::removeEncryption()
         try {
             m_pImpl->ReadContents();
         }
-        catch ( const uno::RuntimeException& rRuntimeException )
+        catch ( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
         catch ( const uno::Exception& )
@@ -4073,18 +4074,14 @@ void SAL_CALL OStorage::removeEncryption()
             m_pImpl->m_bHasCommonEncryptionData = false;
             m_pImpl->m_aCommonEncryptionData.clear();
         }
-        catch( const uno::RuntimeException& rRException )
+        catch( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rRException);
-
-            SAL_WARN( "package.xstor", "The call must not fail, it is pretty simple!" );
+            TOOLS_WARN_EXCEPTION( "package.xstor", "The call must not fail, it is pretty simple!" );
             throw;
         }
-        catch( const uno::Exception& rException )
+        catch( const uno::Exception& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rException);
-
-            SAL_WARN( "package.xstor", "The call must not fail, it is pretty simple!" );
+            TOOLS_WARN_EXCEPTION( "package.xstor", "The call must not fail, it is pretty simple!" );
             throw io::IOException( THROW_WHERE );
         }
     }
@@ -4114,9 +4111,9 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
         try {
             m_pImpl->ReadContents();
         }
-        catch ( const uno::RuntimeException& rRuntimeException )
+        catch ( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
         catch ( const uno::Exception& )
@@ -4139,9 +4136,9 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
             m_pImpl->m_bHasCommonEncryptionData = true;
             m_pImpl->m_aCommonEncryptionData = aEncryptionMap;
         }
-        catch( const uno::Exception& rException )
+        catch( const uno::Exception& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:" );
 
             throw io::IOException( THROW_WHERE );
         }
@@ -4179,9 +4176,9 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
         try {
             m_pImpl->ReadContents();
         }
-        catch ( const uno::RuntimeException& aRuntimeException )
+        catch ( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << aRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
         catch ( const uno::Exception& )
@@ -4200,9 +4197,9 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
             xPackPropSet->setPropertyValue( ENCRYPTION_ALGORITHMS_PROPERTY,
                                             uno::makeAny( aAlgorithms ) );
         }
-        catch ( const uno::RuntimeException& aRuntimeException )
+        catch ( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << aRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
         catch( const uno::Exception& )
@@ -4297,9 +4294,9 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
         try {
             m_pImpl->ReadContents();
         }
-        catch ( const uno::RuntimeException& aRuntimeException )
+        catch ( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << aRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
         catch ( const uno::Exception& )
@@ -4317,9 +4314,9 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
         {
             xPackPropSet->getPropertyValue( ENCRYPTION_ALGORITHMS_PROPERTY ) >>= aResult;
         }
-        catch ( const uno::RuntimeException& aRuntimeException )
+        catch ( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << aRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
         catch( const uno::Exception& )
@@ -4468,9 +4465,9 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
         {
             m_pImpl->ReadContents();
         }
-        catch ( const uno::RuntimeException& rRuntimeException )
+        catch ( const uno::RuntimeException& )
         {
-            SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+            TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
             throw;
         }
         catch ( const uno::Exception& )
@@ -4526,9 +4523,9 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
                 uno::Reference< beans::XPropertySet > xPackPropSet( m_pImpl->m_xPackage, uno::UNO_QUERY_THROW );
                 return xPackPropSet->getPropertyValue( aPropertyName );
             }
-            catch ( const uno::RuntimeException& rRuntimeException )
+            catch ( const uno::RuntimeException& )
             {
-                SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+                TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
                 throw;
             }
             catch ( const uno::Exception& )
@@ -4628,9 +4625,9 @@ sal_Bool SAL_CALL OStorage::hasByID(  const OUString& sID )
         getRelationshipByID( sID );
         return true;
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
     }
 
     return false;
@@ -5013,34 +5010,34 @@ void SAL_CALL OStorage::insertStreamElementDirect(
 
         pElement->m_xStream->InsertStreamDirectly(xInStream, aProps);
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const container::ElementExistException& rElementExistException )
+    catch( const container::ElementExistException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rElementExistException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -5091,39 +5088,39 @@ void SAL_CALL OStorage::copyElementDirectlyTo(
         uno::Reference< embed::XStorage > xStorDest( xDest, uno::UNO_QUERY_THROW );
         m_pImpl->CopyStorageElement( pElement, xStorDest, aNewName, true );
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const container::ElementExistException& rElementExistException )
+    catch( const container::ElementExistException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rElementExistException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -5157,29 +5154,29 @@ void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStrea
     {
         m_pImpl->m_pSwitchStream->CopyAndSwitchPersistenceTo( xStream );
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:" );
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -5227,29 +5224,29 @@ void SAL_CALL OStorage::attachToURL( const OUString& sURL,
             m_pImpl->m_pSwitchStream->SwitchPersistenceTo( xStream );
         }
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -5298,44 +5295,44 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam
         pElement->m_xStorage->ReadContents();
         return uno::makeAny(pElement->m_xStorage->m_aMediaType);
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const container::NoSuchElementException& rNoSuchElementException )
+    catch( const container::NoSuchElementException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rNoSuchElementException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const beans::UnknownPropertyException& rUnknownPropertyException )
+    catch( const beans::UnknownPropertyException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rUnknownPropertyException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const beans::PropertyVetoException& rPropertyVetoException )
+    catch( const beans::PropertyVetoException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rPropertyVetoException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
@@ -5377,34 +5374,34 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons
         if ( xNonconstRef != xTargetStream )
             throw uno::RuntimeException( THROW_WHERE ); // if the stream reference is set it must not be changed!
     }
-    catch( const embed::InvalidStorageException& rInvalidStorageException )
+    catch( const embed::InvalidStorageException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rInvalidStorageException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const lang::IllegalArgumentException& rIllegalArgumentException )
+    catch( const lang::IllegalArgumentException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIllegalArgumentException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const packages::WrongPasswordException& rWrongPasswordException )
+    catch( const packages::WrongPasswordException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rWrongPasswordException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const io::IOException& rIOException )
+    catch( const io::IOException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rIOException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException )
+    catch( const embed::StorageWrappedTargetException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rStorageWrappedTargetException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
-    catch( const uno::RuntimeException& rRuntimeException )
+    catch( const uno::RuntimeException& )
     {
-        SAL_INFO("package.xstor", "Rethrow: " << rRuntimeException);
+        TOOLS_INFO_EXCEPTION("package.xstor", "Rethrow:");
         throw;
     }
     catch( const uno::Exception& )
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx
index 82b6981f4378..e5a965e26951 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -32,6 +32,7 @@
 #include <osl/diagnose.h>
 #include <osl/mutex.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <unotools/configmgr.hxx>
 
@@ -141,10 +142,10 @@ XUnbufferedStream::XUnbufferedStream(
     try {
         if ( mxZipSeek.is() )
             mnZipSize = mxZipSeek->getLength();
-    } catch( Exception& e )
+    } catch( const Exception& )
     {
         // in case of problem the size will stay set to 0
-        SAL_WARN("package", "ignoring " << e);
+        TOOLS_WARN_EXCEPTION("package", "ignoring");
     }
 
     mnZipEnd = mnZipCurrent + mnZipSize;
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 4692372c8fe5..cb0c1cd3dff9 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -54,6 +54,7 @@
 #include <rtl/instance.hxx>
 #include <rtl/random.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <PackageConstants.hxx>
 
@@ -944,9 +945,9 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream()
         OSL_FAIL( "ZipException thrown" );//rException.Message);
         return uno::Reference < io::XInputStream > ();
     }
-    catch ( Exception &ex )
+    catch ( const Exception & )
     {
-        SAL_WARN( "package", "Exception is thrown during stream wrapping!" << ex);
+        TOOLS_WARN_EXCEPTION( "package", "Exception is thrown during stream wrapping!");
         return uno::Reference < io::XInputStream > ();
     }
 }
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 3240c017d007..5e97042ec818 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -57,6 +57,7 @@
 #include <xmloff/DocumentSettingsContext.hxx>
 #include <xmloff/xmluconv.hxx>
 #include <xmloff/xmlmetai.hxx>
+#include <tools/diagnose_ex.h>
 #include <com/sun/star/util/XModifiable.hpp>
 #include <svtools/sfxecode.hxx>
 #include "xmlEnums.hxx"
@@ -150,11 +151,9 @@ static ErrCode ReadThroughComponent(
     {
         xParser->parseStream( aParserInput );
     }
-    catch (const SAXParseException& r)
+    catch (const SAXParseException&)
     {
-        SAL_WARN( "reportdesign", "SAX parse exception caught while importing: "
-                    << r << " "
-                    << r.LineNumber << ',' << r.ColumnNumber );
+        TOOLS_WARN_EXCEPTION( "reportdesign", "SAX parse exception caught while importing");
         return ErrCode(1);
     }
     catch (const SAXException&)
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 42ab6c415021..6023758ded55 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4172,9 +4172,9 @@ bool OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,
             {
                 xControlModel->setPropertyValue(_sProperty,_aValue);
             }
-            catch(const UnknownPropertyException& e)
+            catch(const UnknownPropertyException&)
             {
-                SAL_WARN("reportdesign", "UnknownPropertyException:" << e);
+                TOOLS_WARN_EXCEPTION("reportdesign", "");
             }
     }
 
commit 8d234284d0ec0393e8d9d5057f68f48f33bc8d9d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Jun 15 13:12:33 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jun 15 19:57:59 2019 +0200

    loplugin:logexceptionnicely in linguistic..oox
    
    Change-Id: I3f96494f5fecb2f1011578b768198c1204147202
    Reviewed-on: https://gerrit.libreoffice.org/74099
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 7aca99026250..9c8aed2a49a7 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -677,11 +677,9 @@ void GrammarCheckingIterator::DequeueAndCheck()
                         AddEntry( xFPIterator, xFlatParaNext, aCurDocId, 0, aFPEntryItem.m_bAutomatic );
                     }
                 }
-                catch (css::uno::Exception & e)
+                catch (css::uno::Exception &)
                 {
-                    SAL_WARN(
-                        "linguistic",
-                        "GrammarCheckingIterator::DequeueAndCheck ignoring " << e);
+                    TOOLS_WARN_EXCEPTION("linguistic", "GrammarCheckingIterator::DequeueAndCheck ignoring");
                 }
             }
 
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 6e19aa77841f..164de7d8a140 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -51,6 +51,7 @@
 #include <comphelper/propertysequence.hxx>
 #include <comphelper/propertyvalue.hxx>
 #include <comphelper/sequence.hxx>
+#include <tools/diagnose_ex.h>
 #include <tools/gen.hxx>
 #include <tools/globname.hxx>
 #include <tools/mapunit.hxx>
@@ -296,9 +297,9 @@ void Shape::addShape(
             }
         }
     }
-    catch( const Exception& e )
+    catch( const Exception& )
     {
-        SAL_WARN( "oox.drawingml", "Shape::addShape: " << e );
+        TOOLS_WARN_EXCEPTION( "oox.drawingml", "Shape::addShape" );
     }
 }
 
@@ -1500,9 +1501,9 @@ void Shape::keepDiagramCompatibilityInfo()
         } else
             xSet->setPropertyValue( aGrabBagPropName, Any( maDiagramDoms ) );
     }
-    catch( const Exception& e )
+    catch( const Exception& )
     {
-        SAL_WARN( "oox.drawingml", "Shape::keepDiagramCompatibilityInfo: " << e );
+        TOOLS_WARN_EXCEPTION( "oox.drawingml", "Shape::keepDiagramCompatibilityInfo" );
     }
 }
 
@@ -1523,9 +1524,9 @@ void Shape::convertSmartArtToMetafile(XmlFilterBase const & rFilterBase)
             xShapes->remove(Reference<XShape>(xShapes->getByIndex(0), UNO_QUERY_THROW));
         xShapes->add(xShape);
     }
-    catch (const Exception& e)
+    catch (const Exception&)
     {
-        SAL_WARN("oox.drawingml", "Shape::convertSmartArtToMetafile: " << e);
+        TOOLS_WARN_EXCEPTION("oox.drawingml", "Shape::convertSmartArtToMetafile");
     }
 }
 
@@ -1592,9 +1593,9 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase const & rFilte
         xPropSet->setPropertyValue(  "SizeProtect", Any( true ) );
         xPropSet->setPropertyValue(  "Name", Any( OUString( "RenderedShapes" ) ) );
     }
-    catch( const Exception& e )
+    catch( const Exception& )
     {
-        SAL_WARN( "oox.drawingml", "Shape::renderDiagramToGraphic: " << e );
+        TOOLS_WARN_EXCEPTION( "oox.drawingml", "Shape::renderDiagramToGraphic" );
     }
 
     return xShape;
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index 713c5a745b3d..545327e36228 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -130,9 +130,9 @@ void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields,
             xProps->setPropertyValue( "IsDate", makeAny( bIsDate ) );
             xProps->setPropertyValue( "IsFixed", makeAny( false ) );
         }
-        catch(Exception & e)
+        catch(const Exception &)
         {
-            SAL_WARN("oox",  e );
+            TOOLS_WARN_EXCEPTION("oox", "");
         }
     }
     else if ( sType == "slidenum" )
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 95962aa1d656..cf5b645bd937 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1291,9 +1291,9 @@ void ChartExport::exportBitmapFill( const Reference< XPropertySet >& xPropSet )
                 }
             }
         }
-        catch (const uno::Exception & rEx)
+        catch (const uno::Exception &)
         {
-            SAL_INFO("oox", "ChartExport::exportBitmapFill " << rEx);
+            TOOLS_WARN_EXCEPTION("oox", "ChartExport::exportBitmapFill");
         }
     }
 }
@@ -1318,10 +1318,9 @@ void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet
                 mpFS->endElementNS( XML_a, XML_gradFill );
             }
         }
-        catch (const uno::Exception & rEx)
+        catch (const uno::Exception &)
         {
-            SAL_INFO("oox",
-                "ChartExport::exportGradientFill " << rEx);
+            TOOLS_INFO_EXCEPTION("oox", "ChartExport::exportGradientFill");
         }
 
     }
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 85834a14b1b0..c87cb3a1f617 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -36,6 +36,7 @@
 #include <oox/drawingml/drawingmltypes.hxx>
 #include <svtools/unitconv.hxx>
 #include <sax/fastattribs.hxx>
+#include <tools/diagnose_ex.h>
 #include <i18nlangtag/languagetag.hxx>
 
 #include <cstdio>
@@ -4275,10 +4276,9 @@ void DrawingML::writeDiagramRels(const uno::Sequence<uno::Sequence<uno::Any>>& x
         {
             comphelper::OStorageHelper::CopyInputToOutput(dataImagebin, xBinOutStream);
         }
-        catch (const uno::Exception& rException)
+        catch (const uno::Exception&)
         {
-            SAL_WARN("oox.drawingml", "DrawingML::writeDiagramRels Failed to copy grabbaged Image: "
-                     << rException);
+            TOOLS_WARN_EXCEPTION("oox.drawingml", "DrawingML::writeDiagramRels Failed to copy grabbaged Image");
         }
         dataImagebin->closeInput();
     }
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index b36ebb26f67f..d441406ae95f 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -96,6 +96,7 @@
 #include <filter/msfilter/escherex.hxx>
 #include <svx/svdoashp.hxx>
 #include <svx/svdoole2.hxx>
+#include <tools/diagnose_ex.h>
 #include <editeng/svxenum.hxx>
 #include <svx/unoapi.hxx>
 #include <oox/export/chartexport.hxx>
@@ -287,9 +288,9 @@ static uno::Reference<io::XInputStream> lcl_StoreOwnAsOOXML(
     {
         xStorable->storeToURL("private:stream", args);
     }
-    catch (uno::Exception const& e)
+    catch (uno::Exception const&)
     {
-        SAL_WARN("oox.shape", "oox::GetOLEObjectStream: " << e);
+        TOOLS_WARN_EXCEPTION("oox.shape", "oox::GetOLEObjectStream");
         return nullptr;
     }
     xTempStream->getOutputStream()->closeOutput();
@@ -327,9 +328,9 @@ uno::Reference<io::XInputStream> GetOLEObjectStream(
                     o_rpProgID, o_rMediaType, o_rRelationType, o_rSuffix);
         }
     }
-    catch (uno::Exception const& e)
+    catch (uno::Exception const&)
     {
-        SAL_WARN("oox.shape", "oox::GetOLEObjectStream: " << e);
+        TOOLS_WARN_EXCEPTION("oox.shape", "oox::GetOLEObjectStream");
     }
     return xInStream;
 }
@@ -1951,9 +1952,9 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
 
         entryName = uno::Reference<embed::XEmbedPersist>(xObj, uno::UNO_QUERY_THROW)->getEntryName();
     }
-    catch (uno::Exception const& e)
+    catch (uno::Exception const&)
     {
-        SAL_WARN("oox.shape", "ShapeExport::WriteOLE2Shape: " << e);
+        TOOLS_WARN_EXCEPTION("oox.shape", "ShapeExport::WriteOLE2Shape");
         return *this;
     }
 
@@ -2021,8 +2022,8 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
 
     try {
         ::comphelper::OStorageHelper::CopyInputToOutput(xInStream, xOutStream);
-    } catch (uno::Exception const& e) {
-        SAL_WARN("oox.shape", "ShapeExport::WriteOLEObject: " << e);
+    } catch (uno::Exception const&) {
+        TOOLS_WARN_EXCEPTION("oox.shape", "ShapeExport::WriteOLEObject");
     }
 
     OUString const sRelId = mpFB->addRelation(
diff --git a/oox/source/helper/propertyset.cxx b/oox/source/helper/propertyset.cxx
index 02abed12cd5f..ca972c8f3c90 100644
--- a/oox/source/helper/propertyset.cxx
+++ b/oox/source/helper/propertyset.cxx
@@ -24,6 +24,7 @@
 #include <osl/diagnose.h>
 #include <rtl/strbuf.hxx>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <oox/helper/propertymap.hxx>
 
 namespace oox {
@@ -117,10 +118,10 @@ bool PropertySet::implGetPropertyValue( Any& orValue, const OUString& rPropName
         orValue = mxPropSet->getPropertyValue( rPropName );
         return true;
     }
-    catch( Exception& e)
+    catch( const Exception&)
     {
-        SAL_WARN( "oox", "PropertySet::implGetPropertyValue - cannot get property \"" <<
-                  rPropName << "\" Error: " << e);
+        TOOLS_WARN_EXCEPTION( "oox", "PropertySet::implGetPropertyValue - cannot get property \"" <<
+                  rPropName << "\"");
     }
     return false;
 }
@@ -132,10 +133,10 @@ bool PropertySet::implSetPropertyValue( const OUString& rPropName, const Any& rV
         mxPropSet->setPropertyValue( rPropName, rValue );
         return true;
     }
-    catch( Exception& e)
+    catch( const Exception&)
     {
-        SAL_WARN( "oox", "PropertySet::implSetPropertyValue - cannot set property \"" <<
-                  rPropName << "\" Error: " << e);
+        TOOLS_WARN_EXCEPTION( "oox", "PropertySet::implSetPropertyValue - cannot set property \"" <<
+                  rPropName << "\"");
     }
     return false;
 }
diff --git a/oox/source/helper/zipstorage.cxx b/oox/source/helper/zipstorage.cxx
index 2dbf3cdf2700..3de75bf68b94 100644
--- a/oox/source/helper/zipstorage.cxx
+++ b/oox/source/helper/zipstorage.cxx
@@ -28,6 +28,7 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <osl/diagnose.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <comphelper/storagehelper.hxx>
 #include <oox/helper/helper.hxx>
 
@@ -61,10 +62,9 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R
         mxStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(
             ZIP_STORAGE_FORMAT_STRING, rxInStream, rxContext, false);
     }
-    catch (Exception const& e)
+    catch (Exception const&)
     {
-        SAL_WARN("oox.storage", "ZipStorage::ZipStorage "
-                "exception opening input storage: " << e);
+        TOOLS_WARN_EXCEPTION("oox.storage", "ZipStorage::ZipStorage exception opening input storage");
     }
 }
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list