[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source canvas/source chart2/source connectivity/source cui/source dbaccess/source desktop/source editeng/source extensions/source filter/source forms/source formula/source io/source linguistic/source oox/source sc/source sdext/source sd/source sfx2/source slideshow/source svtools/source svx/source sw/source toolkit/source ucb/source unotools/source vcl/source writerfilter/source xmloff/source xmlsecurity/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 16 11:32:20 UTC 2019


 avmedia/source/framework/mediaitem.cxx                       |    3 
 basctl/source/basicide/scriptdocument.cxx                    |    3 
 basic/source/classes/sbxmod.cxx                              |    3 
 basic/source/runtime/runtime.cxx                             |    3 
 basic/source/uno/namecont.cxx                                |   20 -
 canvas/source/directx/dx_config.cxx                          |    4 
 chart2/source/tools/ErrorBar.cxx                             |    3 
 connectivity/source/commontools/parameters.cxx               |   21 -
 connectivity/source/cpool/ZPoolCollection.cxx                |    3 
 connectivity/source/drivers/file/FDatabaseMetaData.cxx       |    3 
 cui/source/customize/CommandCategoryListBox.cxx              |    3 
 cui/source/customize/cfg.cxx                                 |   12 
 cui/source/dialogs/scriptdlg.cxx                             |   12 
 cui/source/options/optjava.cxx                               |    3 
 cui/source/options/optlingu.cxx                              |    8 
 cui/source/options/optpath.cxx                               |    3 
 cui/source/options/optsave.cxx                               |    3 
 cui/source/options/optupdt.cxx                               |    6 
 cui/source/options/treeopt.cxx                               |   12 
 dbaccess/source/core/api/RowSet.cxx                          |    3 
 dbaccess/source/core/dataaccess/databasedocument.cxx         |    3 
 dbaccess/source/core/dataaccess/datasource.cxx               |    3 
 dbaccess/source/ui/misc/UITools.cxx                          |    3 
 desktop/source/app/app.cxx                                   |    3 
 desktop/source/app/check_ext_deps.cxx                        |    3 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx             |    6 
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx           |    3 
 desktop/source/deployment/manager/dp_manager.cxx             |    6 
 desktop/source/deployment/registry/package/dp_package.cxx    |   10 
 desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx               |    3 
 editeng/source/xml/xmltxtexp.cxx                             |    3 
 extensions/source/bibliography/datman.cxx                    |    3 
 extensions/source/config/ldap/ldapuserprofilebe.cxx          |    3 
 extensions/source/dbpilots/listcombowizard.cxx               |    3 
 extensions/source/propctrlr/eformspropertyhandler.cxx        |    5 
 extensions/source/update/check/updatecheck.cxx               |    6 
 extensions/source/update/check/updatecheckjob.cxx            |    6 
 extensions/source/update/feed/test/updatefeedtest.cxx        |    2 
 filter/source/graphicfilter/icgm/cgm.cxx                     |    3 
 filter/source/odfflatxml/OdfFlatXml.cxx                      |    3 
 filter/source/xsltfilter/XSLTFilter.cxx                      |    3 
 forms/source/component/ListBox.cxx                           |    3 
 forms/source/misc/InterfaceContainer.cxx                     |    3 
 formula/source/ui/dlg/formula.cxx                            |    6 
 io/source/stm/opump.cxx                                      |   15 
 linguistic/source/convdiclist.cxx                            |    7 
 linguistic/source/gciterator.cxx                             |    6 
 oox/source/drawingml/textfield.cxx                           |    3 
 oox/source/drawingml/textrun.cxx                             |    3 
 oox/source/ole/axcontrol.cxx                                 |   15 
 oox/source/ppt/presentationfragmenthandler.cxx               |    6 
 oox/source/ppt/slidefragmenthandler.cxx                      |    3 
 oox/source/vml/vmldrawing.cxx                                |    3 
 sc/source/core/data/dpsave.cxx                               |    3 
 sc/source/filter/oox/excelfilter.cxx                         |    3 
 sc/source/filter/oox/pivotcachebuffer.cxx                    |    6 
 sc/source/filter/xml/xmlwrap.cxx                             |    9 
 sc/source/ui/Accessibility/DrawModelBroadcaster.cxx          |    3 
 sd/source/core/CustomAnimationCloner.cxx                     |   11 
 sd/source/core/stlsheet.cxx                                  |    3 
 sd/source/filter/html/htmlex.cxx                             |    6 
 sd/source/filter/xml/sdxmlwrp.cxx                            |   12 
 sd/source/helper/simplereferencecomponent.cxx                |    3 
 sd/source/ui/accessibility/AccessiblePageShape.cxx           |    3 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx                        |   21 -
 sd/source/ui/framework/module/ModuleController.cxx           |    3 
 sd/source/ui/remotecontrol/Receiver.cxx                      |   14 
 sd/source/ui/slideshow/slideshowimpl.cxx                     |   58 +--
 sd/source/ui/tools/ConfigurationAccess.cxx                   |    3 
 sd/source/ui/unoidl/DrawController.cxx                       |    3 
 sd/source/ui/unoidl/unomodel.cxx                             |    3 
 sd/source/ui/view/drviews1.cxx                               |    3 
 sdext/source/minimizer/configurationaccess.cxx               |    5 
 sdext/source/presenter/PresenterConfigurationAccess.cxx      |    3 
 sdext/source/presenter/PresenterTextView.cxx                 |    3 
 sfx2/source/appl/appdde.cxx                                  |    3 
 sfx2/source/appl/appserv.cxx                                 |    3 
 sfx2/source/appl/newhelp.cxx                                 |   15 
 sfx2/source/appl/sfxhelp.cxx                                 |    6 
 sfx2/source/bastyp/helper.cxx                                |    9 
 sfx2/source/control/thumbnailview.cxx                        |    5 
 sfx2/source/dialog/backingwindow.cxx                         |    3 
 sfx2/source/dialog/dinfdlg.cxx                               |    6 
 sfx2/source/dialog/filedlghelper.cxx                         |   12 
 sfx2/source/doc/DocumentMetadataAccess.cxx                   |    3 
 sfx2/source/doc/docfile.cxx                                  |    9 
 sfx2/source/doc/doctempl.cxx                                 |    3 
 sfx2/source/doc/doctemplates.cxx                             |    3 
 slideshow/source/engine/activitiesqueue.cxx                  |    2 
 slideshow/source/engine/animationnodes/animationbasenode.cxx |    2 
 slideshow/source/engine/eventqueue.cxx                       |    2 
 slideshow/source/engine/pointersymbol.cxx                    |    2 
 slideshow/source/engine/shapes/drawinglayeranimation.cxx     |    2 
 slideshow/source/engine/shapes/externalshapebase.cxx         |    2 
 slideshow/source/engine/shapes/viewbackgroundshape.cxx       |    2 
 slideshow/source/engine/shapes/viewmediashape.cxx            |    4 
 slideshow/source/engine/slide/layermanager.cxx               |    2 
 slideshow/source/engine/slide/slideanimations.cxx            |    2 
 slideshow/source/engine/slide/slideimpl.cxx                  |    6 
 slideshow/source/engine/slidebitmap.cxx                      |    2 
 slideshow/source/engine/slideshowimpl.cxx                    |    2 
 slideshow/source/engine/soundplayer.cxx                      |    2 
 slideshow/source/engine/waitsymbol.cxx                       |    2 
 svtools/source/contnr/contentenumeration.cxx                 |   14 
 svx/source/accessibility/AccessibleShape.cxx                 |    3 
 svx/source/form/datanavi.cxx                                 |  174 +++--------
 svx/source/svdraw/svdmodel.cxx                               |    3 
 svx/source/svdraw/svdomedia.cxx                              |    3 
 svx/source/svdraw/svdoole2.cxx                               |   18 -
 svx/source/tbxctrls/tbxcolor.cxx                             |    3 
 sw/source/core/access/accmap.cxx                             |    3 
 sw/source/core/edit/edundo.cxx                               |    9 
 sw/source/filter/ww8/docxexport.cxx                          |    3 
 sw/source/filter/xml/swxml.cxx                               |    9 
 sw/source/filter/xml/xmlfmt.cxx                              |    3 
 sw/source/ui/vba/vbadocumentproperties.cxx                   |    3 
 sw/source/uibase/dbui/dbmgr.cxx                              |   12 
 sw/source/uibase/dbui/mmconfigitem.cxx                       |    9 
 toolkit/source/controls/controlmodelcontainerbase.cxx        |    6 
 ucb/source/core/ucbstore.cxx                                 |    3 
 ucb/source/ucp/expand/ucpexpand.cxx                          |    3 
 unotools/source/config/viewoptions.cxx                       |   43 --
 unotools/source/ucbhelper/ucbhelper.cxx                      |   47 --
 vcl/source/app/salusereventlist.cxx                          |    3 
 vcl/source/app/scheduler.cxx                                 |    3 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx            |    3 
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx              |   10 
 xmloff/source/chart/SchXMLPlotAreaContext.cxx                |    3 
 xmloff/source/chart/XMLChartStyleContext.cxx                 |    3 
 xmloff/source/core/xmlimp.cxx                                |    3 
 xmloff/source/draw/shapeexport.cxx                           |    3 
 xmloff/source/table/XMLTableExport.cxx                       |   12 
 xmloff/source/table/XMLTableImport.cxx                       |    6 
 xmlsecurity/source/dialogs/macrosecurity.cxx                 |    3 
 134 files changed, 329 insertions(+), 678 deletions(-)

New commits:
commit 889dc7bffa02236bf2ad56b382997771f0fcf3c6
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 15 15:56:55 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Aug 16 13:31:26 2019 +0200

    use more TOOLS_WARN_EXCEPTION
    
    Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86
    Reviewed-on: https://gerrit.libreoffice.org/77569
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx
index 4c0289c1970e..c092b3c67fe2 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -509,8 +509,7 @@ bool CreateMediaTempFile(uno::Reference<io::XInputStream> const& xInStream,
     }
     catch (uno::Exception const&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("avmedia", "exception: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("avmedia", "");
         return false;
     }
     o_rTempFileURL = tempFileURL;
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 2ecc4a2ab23e..3d5e5822180b 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -411,8 +411,7 @@ namespace basctl
         }
         catch (const css::ucb::ContentCreationException&)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "basctl.basicide", "ScriptDocument::getBasicManager: Caught exception: " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "basctl.basicide", "ScriptDocument::getBasicManager" );
         }
         return nullptr;
     }
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 0ba3cb5d8b66..09eb6a57663a 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -146,8 +146,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar )
                 }
                 catch(const Exception& )
                 {
-                    css::uno::Any ex( cppu::getCaughtException() );
-                    SAL_WARN( "basic", "DocObjectWrapper::DocObjectWrapper: Caught exception! " << exceptionToString(ex) );
+                    TOOLS_WARN_EXCEPTION( "basic", "DocObjectWrapper::DocObjectWrapper" );
                 }
             }
 
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 74f849ad576f..70300cc6542e 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -344,8 +344,7 @@ SbiInstance::~SbiInstance()
     }
     catch( const Exception& )
     {
-        css::uno::Any ex(DbgGetCaughtException());
-        SAL_WARN("basic", "SbiInstance::~SbiInstance: caught an exception while disposing the components! " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION("basic", "SbiInstance::~SbiInstance: caught an exception while disposing the components" );
     }
 }
 
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 95a05bca652c..3f5840b51b06 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -908,12 +908,9 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
                         catch(const uno::Exception& )
                         {
                             #if OSL_DEBUG_LEVEL > 0
-                            Any aError( ::cppu::getCaughtException() );
-                            SAL_WARN(
+                            TOOLS_WARN_EXCEPTION(
                                 "basic",
-                                "couldn't open sub storage for library \""
-                                    << rLib.aName << "\". Exception: "
-                                    << exceptionToString(aError));
+                                "couldn't open sub storage for library \"" << rLib.aName << "\"");
                             #endif
                         }
                     }
@@ -1938,12 +1935,9 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
                     }
                     catch(const uno::Exception& )
                     {
-                        Any aError( ::cppu::getCaughtException() );
-                        SAL_WARN(
+                        TOOLS_WARN_EXCEPTION(
                             "basic",
-                            "couldn't create sub storage for library \""
-                                << rLib.aName << "\". Exception: "
-                                << exceptionToString(aError));
+                            "couldn't create sub storage for library \"" << rLib.aName << "\"");
                         throw;
                     }
 #endif
@@ -2349,11 +2343,9 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
             }
             catch(const uno::Exception& )
             {
-                Any aError( ::cppu::getCaughtException() );
-                SAL_WARN(
+                TOOLS_WARN_EXCEPTION(
                     "basic",
-                    "couldn't open sub storage for library \"" << Name
-                        << "\". Exception: " << exceptionToString(aError));
+                    "couldn't open sub storage for library \"" << Name << "\"");
                 throw;
             }
 #endif
diff --git a/canvas/source/directx/dx_config.cxx b/canvas/source/directx/dx_config.cxx
index 5d805dcb54db..f97f08b338a0 100644
--- a/canvas/source/directx/dx_config.cxx
+++ b/canvas/source/directx/dx_config.cxx
@@ -84,7 +84,7 @@ namespace dxcanvas
         }
         catch( const uno::Exception& )
         {
-            SAL_WARN( "canvas", exceptionToString( cppu::getCaughtException() ) );
+            TOOLS_WARN_EXCEPTION( "canvas", "" );
         }
     }
 
@@ -115,7 +115,7 @@ namespace dxcanvas
         }
         catch( const uno::Exception& )
         {
-            SAL_WARN( "canvas", exceptionToString( cppu::getCaughtException() ) );
+            TOOLS_WARN_EXCEPTION( "canvas", "" );
         }
     }
 
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index d605c7b07c8e..90c686f9f672 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -209,10 +209,9 @@ OUString getSourceRangeStrFromLabeledSequences( const uno::Sequence< uno::Refere
         }
         catch (uno::Exception const &)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
             // we can't be sure that this is 100% safe and we don't want to kill the export
             // we should at least check why the exception is thrown
-            SAL_WARN("chart2", "unexpected exception! " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("chart2", "unexpected exception");
         }
         catch (...)
         {
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index 3458ed7cc34e..3485ce29b81f 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -200,8 +200,7 @@ namespace dbtools
             }
             catch( const Exception& )
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN( "connectivity.commontools", "ParameterManager::collectInnerParameters: caught an exception! " << exceptionToString(ex) );
+                TOOLS_WARN_EXCEPTION( "connectivity.commontools", "ParameterManager::collectInnerParameters" );
             }
         }
     }
@@ -430,8 +429,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "connectivity.commontools", "ParameterManager::analyzeFieldLinks: caught an exception! " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "ParameterManager::analyzeFieldLinks" );
         }
     }
 
@@ -669,8 +667,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "connectivity.commontools", "ParameterManager::completeParameters: caught an exception while calling the handler! " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "ParameterManager::completeParameters: caught an exception while calling the handler" );
         }
 
         if ( !pParams->wasSelected() )
@@ -700,8 +697,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "connectivity.commontools", "ParameterManager::completeParameters: caught an exception while propagating the values! " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "ParameterManager::completeParameters: caught an exception while propagating the values" );
         }
         return true;
     }
@@ -795,8 +791,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "connectivity.commontools", "ParameterManager::cacheConnectionInfo: caught an exception! " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "ParameterManager::cacheConnectionInfo: caught an exception" );
         }
     }
 
@@ -852,8 +847,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "connectivity.commontools", "ParameterManager::getParentColumns: caught an exception! " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "ParameterManager::getParentColumns" );
         }
         return _out_rxParentColumns.is();
     }
@@ -949,8 +943,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "connectivity.commontools", "ParameterManager::resetParameterValues: caught an exception! " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "ParameterManager::resetParameterValues" );
         }
 
     }
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 4295f714690e..3bc3b496088e 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -360,8 +360,7 @@ Reference<XInterface> OPoolCollection::openNode(const OUString& _rPath,const Ref
     }
     catch(const Exception&)
     {
-        css::uno::Any ex(DbgGetCaughtException());
-        SAL_WARN("connectivity.cpool", "OConfigurationNode::openNode: caught an exception while retrieving the node! " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("connectivity.cpool", "OConfigurationNode::openNode: caught an exception while retrieving the node");
     }
     return xNode;
 }
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 09fdbbf931bd..0caa53b3bf35 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -148,8 +148,7 @@ namespace
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "connectivity.drivers", "isCaseSensitiveParentFolder: caught an unexpected exception! " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "connectivity.drivers", "isCaseSensitiveParentFolder" );
         }
 
         return nIsCS;
diff --git a/cui/source/customize/CommandCategoryListBox.cxx b/cui/source/customize/CommandCategoryListBox.cxx
index e361388943c4..1591e208b7cc 100644
--- a/cui/source/customize/CommandCategoryListBox.cxx
+++ b/cui/source/customize/CommandCategoryListBox.cxx
@@ -335,8 +335,7 @@ void CommandCategoryListBox::categorySelected(CuiConfigFunctionListBox* pFunctio
             }
             catch( css::uno::Exception const & )
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN("cui.customize", "Caught some exception whilst retrieving browse nodes from factory... Exception: " << exceptionToString(ex));
+                TOOLS_WARN_EXCEPTION("cui.customize", "Caught some exception whilst retrieving browse nodes from factory");
                 // TODO exception handling
             }
 
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f9d67ec32ee3..e30cb708c99b 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -577,8 +577,7 @@ bool MenuSaveInData::Apply()
         }
         catch ( css::uno::Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("cui.customize", "caught some other exception saving settings " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("cui.customize", "caught some other exception saving settings");
         }
 
         SetModified( false );
@@ -2422,8 +2421,7 @@ void ToolbarSaveInData::ApplyToolbar( SvxConfigEntry* pToolbar )
     }
     catch ( css::uno::Exception const & )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("cui.customize", "caught exception saving settings " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("cui.customize", "caught exception saving settings");
     }
 
     PersistChanges( GetConfigManager() );
@@ -2448,8 +2446,7 @@ void ToolbarSaveInData::CreateToolbar( SvxConfigEntry* pToolbar )
     }
     catch ( css::uno::Exception const & )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("cui.customize", "caught exception saving settings " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("cui.customize", "caught exception saving settings");
     }
 
     GetEntries()->push_back( pToolbar );
@@ -3156,8 +3153,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL )
     }
     catch( uno::Exception const & )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("cui.customize", "Caught exception importing XGraphic: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("cui.customize", "Caught exception importing XGraphic");
     }
     return result;
 }
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 5c4035fb01dc..c3e0314502c8 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -666,8 +666,7 @@ IMPL_LINK(SvxScriptOrgDialog, ButtonHdl, weld::Button&, rButton, void)
                 }
                 catch( Exception const & )
                 {
-                    css::uno::Any ex( cppu::getCaughtException() );
-                    SAL_WARN("cui.dialogs", "Caught exception trying to invoke " << exceptionToString(ex) );
+                    TOOLS_WARN_EXCEPTION("cui.dialogs", "Caught exception trying to invoke" );
                 }
             }
         }
@@ -835,8 +834,7 @@ void SvxScriptOrgDialog::createEntry(weld::TreeIter& rEntry)
         }
         catch( Exception const & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("cui.dialogs", "Caught exception trying to Create " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION("cui.dialogs", "Caught exception trying to Create" );
         }
     }
     if ( aChildNode.is() )
@@ -919,8 +917,7 @@ void SvxScriptOrgDialog::renameEntry(weld::TreeIter& rEntry)
         }
         catch( Exception const & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("cui.dialogs", "Caught exception trying to Rename " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION("cui.dialogs", "Caught exception trying to Rename" );
         }
     }
     if ( aChildNode.is() )
@@ -968,8 +965,7 @@ void SvxScriptOrgDialog::deleteEntry(weld::TreeIter& rEntry)
         }
         catch( Exception const & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("cui.dialogs", "Caught exception trying to delete " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION("cui.dialogs", "Caught exception trying to delete" );
         }
     }
 
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 654d96ac879a..992403d27e94 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -287,8 +287,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, StartFolderPickerHdl, void*, void)
     }
     catch ( Exception const & )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "cui.options", "SvxJavaOptionsPage::StartFolderPickerHdl(): caught exception " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "cui.options", "SvxJavaOptionsPage::StartFolderPickerHdl()" );
     }
 }
 
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 945963ddc989..d9ab82538186 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -107,15 +107,9 @@ static bool KillFile_Impl( const OUString& rURL )
         Content aCnt( rURL, uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
         aCnt.executeCommand( "delete", Any( true ) );
     }
-    catch( css::ucb::CommandAbortedException& )
-    {
-        SAL_WARN( "cui.options", "KillFile: CommandAbortedException" );
-        bRet = false;
-    }
     catch( ... )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "cui.options", "KillFile: Any other exception " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "cui.options", "KillFile" );
         bRet = false;
     }
 
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 46d930d1c346..9123d5cb9fe0 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -569,8 +569,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, weld::Button&, void)
         }
         catch( Exception const & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "cui.options", "SvxPathTabPage::PathHdl_Impl: exception from folder picker " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "cui.options", "SvxPathTabPage::PathHdl_Impl: exception from folder picker" );
         }
     }
     else
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 64faac98f389..e0f58dfacb92 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -417,8 +417,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
         }
         catch(Exception const &)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "cui.options", "exception in FilterFactory access: " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "cui.options", "exception in FilterFactory access" );
         }
 
         pImpl->bInitialized = true;
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 8477f07fa8f1..6f308bd6455d 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -173,8 +173,7 @@ void SvxOnlineUpdateTabPage::UpdateUserAgent()
             }
         }
     } catch (const uno::Exception &) {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "cui.options", "Unexpected exception fetching User Agent " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "cui.options", "Unexpected exception fetching User Agent" );
     }
 }
 
@@ -393,8 +392,7 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl, weld::Button&, void)
     }
     catch( const uno::Exception& )
     {
-         css::uno::Any ex( cppu::getCaughtException() );
-         SAL_WARN("cui.options", "Caught exception, thread terminated. " << exceptionToString(ex));
+         TOOLS_WARN_EXCEPTION("cui.options", "Caught exception, thread terminated");
     }
 }
 
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 0c33c9f720ed..cb8c14df1cf3 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1419,8 +1419,7 @@ static OUString getCurrentFactory_Impl( const Reference< XFrame >& _xFrame )
         }
         catch ( Exception const & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "cui.options", "getActiveModule_Impl(): exception of XModuleManager::identify() " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "cui.options", "getActiveModule_Impl(): exception of XModuleManager::identify()" );
         }
     }
 
@@ -1763,8 +1762,7 @@ OUString OfaTreeOptionsDialog::GetModuleIdentifier( const Reference< XFrame >& r
         }
         catch ( Exception const & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "cui.options", "OfaTreeOptionsDialog::GetModuleIdentifier(): exception of XModuleManager::identify() " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION( "cui.options", "OfaTreeOptionsDialog::GetModuleIdentifier(): exception of XModuleManager::identify()");
         }
     }
     return sModule;
@@ -2118,8 +2116,7 @@ void ExtensionsTabPage::CreateDialogWithHandler()
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "cui.options", "ExtensionsTabPage::CreateDialogWithHandler(): exception of XDialogProvider2::createDialogWithHandler(): " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION( "cui.options", "ExtensionsTabPage::CreateDialogWithHandler(): exception of XDialogProvider2::createDialogWithHandler()");
     }
 }
 
@@ -2135,8 +2132,7 @@ bool ExtensionsTabPage::DispatchAction( const OUString& rAction )
         }
         catch ( Exception const & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "cui.options", "ExtensionsTabPage::DispatchAction(): exception of XDialogEventHandler::callHandlerMethod() " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "cui.options", "ExtensionsTabPage::DispatchAction(): exception of XDialogEventHandler::callHandlerMethod()" );
         }
     }
     return bRet;
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index b0249a27702b..919ece8761c9 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1475,8 +1475,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
     }
     catch(Exception const &)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("dbaccess", "ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters! " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("dbaccess", "ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters");
     }
 
     // we're done with the parameters, now for the real execution
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index b5ee7df84635..f1f5b8a1b881 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1681,8 +1681,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
         }
         catch (const uno::Exception&)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("dbaccess", "exception setting Version: " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("dbaccess", "exception setting Version");
         }
     }
 
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 4085d705f67b..49560988fc0f 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -706,8 +706,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("dbaccess",  "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error! " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION("dbaccess",  "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error" );
         }
         if ( !xDriver.is() || !xDriver->acceptsURL( m_pImpl->m_sConnectURL ) )
         {
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 47414efe08ab..83c0cb49b894 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -205,8 +205,7 @@ SQLExceptionInfo createConnection(  const Reference< css::beans::XPropertySet>&
     catch(const SQLWarning& e) { aInfo = SQLExceptionInfo(e); }
     catch(const SQLException& e) { aInfo = SQLExceptionInfo(e); }
     catch(const Exception&) {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("dbaccess.ui", "SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception! " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("dbaccess.ui", "SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception");
     }
 
     return aInfo;
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 380e21fd8fca..bd203f943739 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2501,8 +2501,7 @@ IMPL_STATIC_LINK_NOARG(Desktop, AsyncInitFirstRun, Timer *, void)
     }
     catch(const css::uno::Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "desktop.app", "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ... " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "desktop.app", "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor" );
     }
 }
 
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 6fb85c4a685a..8abb2ffbda5e 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -295,8 +295,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
                 }
                 catch ( const uno::RuntimeException & ) { throw; }
                 catch (const uno::Exception & ) {
-                   css::uno::Any ex( cppu::getCaughtException() );
-                   SAL_WARN( "desktop.app", exceptionToString(ex) );
+                   TOOLS_WARN_EXCEPTION( "desktop.app", "" );
                 }
 
                 if ( bRegistered )
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 0de89e91d050..765f0939845d 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -682,8 +682,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
         }
         catch (const lang::IllegalArgumentException &)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "desktop", exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "desktop", "" );
         }
     }
     xFilePicker->setCurrentFilter( sDefaultFilter );
@@ -1277,8 +1276,7 @@ bool UpdateRequiredDialog::isEnabled( const uno::Reference< deployment::XPackage
     }
     catch ( const uno::RuntimeException & ) { throw; }
     catch (const uno::Exception & ) {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "desktop", exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "desktop", "" );
         bRegistered = false;
     }
 
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 65b4e1c0592c..0b6ab74848ad 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -337,8 +337,7 @@ PackageState TheExtensionManager::getPackageState( const uno::Reference< deploym
         throw;
     }
     catch (const uno::Exception &) {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "desktop", exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "desktop", "" );
         return NOT_AVAILABLE;
     }
 }
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 78473d35bff9..1f5475f0c937 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -1040,14 +1040,12 @@ PackageManagerImpl::getDeployedPackages_(
                             ignore other platforms than the current one */ ) );
         }
         catch (const lang::IllegalArgumentException &) {
-            css::uno::Any ex( cppu::getCaughtException() );
             // ignore
-            SAL_WARN( "desktop", exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "desktop", "" );
         }
         catch (const deployment::DeploymentException&) {
-            css::uno::Any ex( cppu::getCaughtException() );
             // ignore
-            SAL_WARN( "desktop", exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "desktop", "" );
         }
     }
     return comphelper::containerToSequence(packages);
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index c5475cae55a0..38f809c6a40f 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -846,7 +846,7 @@ void BackendImpl::PackageImpl::processPackage_(
                         }
                         catch (const Exception &)
                         {
-                            SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) );
+                            TOOLS_WARN_EXCEPTION( "desktop", "" );
                             // ignore any errors of rollback
                         }
                     }
@@ -933,7 +933,7 @@ OUString BackendImpl::PackageImpl::getDescription()
         }
         catch ( const css::deployment::DeploymentException& )
         {
-            SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) );
+            TOOLS_WARN_EXCEPTION( "desktop", "" );
         }
     }
 
@@ -1055,10 +1055,10 @@ void BackendImpl::PackageImpl::exportTo(
         }
         // xxx todo: think about exception specs:
         catch (const deployment::DeploymentException &) {
-            SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) );
+            TOOLS_WARN_EXCEPTION( "desktop", "" );
         }
-        catch (const lang::IllegalArgumentException & exc) {
-            SAL_WARN( "desktop", exceptionToString(Any(exc)) );
+        catch (const lang::IllegalArgumentException &) {
+            TOOLS_WARN_EXCEPTION( "desktop", "" );
         }
 
         std::vector< Sequence<beans::PropertyValue> > manifest;
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index fb04a35bccda..cf4f425bb32f 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -122,8 +122,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
             xComp->dispose();
     }
     catch (const RuntimeException &) {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "desktop", exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "desktop", "" );
     }
 }
 
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 4696bfdc6fcc..646d6819b1d3 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -340,8 +340,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
     }
     catch( const uno::Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("editeng", "exception during xml export: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("editeng", "exception during xml export");
     }
 }
 
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 64201ff405fb..996df17cfc38 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -170,8 +170,7 @@ static Reference< XNameAccess >  getColumns(const Reference< XForm > & _rxForm)
             }
             catch (const Exception&)
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN( "extensions.biblio", "::getColumns : caught an exception. " << exceptionToString(ex));
+                TOOLS_WARN_EXCEPTION( "extensions.biblio", "::getColumns");
             }
 
         }
diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx
index f1f3143417a9..ccec13a6365e 100644
--- a/extensions/source/config/ldap/ldapuserprofilebe.cxx
+++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx
@@ -141,8 +141,7 @@ bool LdapUserProfileBe::readLdapConfiguration(
     }
     catch (const uno::Exception&)
     {
-        css::uno::Any ex(DbgGetCaughtException());
-        SAL_WARN("extensions.config", "LdapUserProfileBackend: access to configuration data failed: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("extensions.config", "LdapUserProfileBackend: access to configuration data failed");
         return false;
     }
 
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index 537d2e35b820..77fee4c8396e 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -255,8 +255,7 @@ namespace dbp
             }
             catch(const Exception&)
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN( "extensions.dbpilots", "OLinkFieldsPage::initializePage: caught an exception while retrieving the columns! " << exceptionToString(ex));
+                TOOLS_WARN_EXCEPTION( "extensions.dbpilots", "OLinkFieldsPage::initializePage: caught an exception while retrieving the columns");
             }
         }
         return aColumnNames;
diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx
index 5bf819e099f2..65f986126332 100644
--- a/extensions/source/propctrlr/eformspropertyhandler.cxx
+++ b/extensions/source/propctrlr/eformspropertyhandler.cxx
@@ -148,9 +148,8 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "extensions.propctrlr", "EFormsPropertyHandler::getPropertyValue: caught an exception!"
-                "\n(have been asked for the \"" <<_rPropertyName << "\" property.) " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsPropertyHandler::getPropertyValue: caught an exception!"
+                "(have been asked for the \"" <<_rPropertyName << "\" property.)");
         }
         return aReturn;
     }
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index b77bcc286b36..e416e8cdea95 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -524,9 +524,8 @@ UpdateCheckThread::run()
     }
 
     catch(const uno::Exception&) {
-        css::uno::Any ex( cppu::getCaughtException() );
         // Silently catch all errors
-        SAL_WARN("extensions.update", "Caught exception, thread terminated. " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION("extensions.update", "Caught exception, thread terminated" );
     }
 }
 
@@ -541,8 +540,7 @@ ManualUpdateCheckThread::run()
     }
     catch(const uno::Exception&) {
         // Silently catch all errors
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("extensions.update", "Caught exception, thread terminated. " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION("extensions.update", "Caught exception, thread terminated" );
     }
 }
 
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index 4d018bea5c77..683ac5ce7db5 100644
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -134,9 +134,8 @@ void SAL_CALL InitUpdateCheckJobThread::run()
         if ( m_bShowDialog )
             aController->showDialog( true );
     } catch (const uno::Exception &) {
-        css::uno::Any ex( cppu::getCaughtException() );
         // fdo#64962 - don't bring the app down on some unexpected exception.
-        SAL_WARN("extensions.update", "Caught init update exception, thread terminated. " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION("extensions.update", "Caught init update exception, thread terminated" );
     }
 }
 
@@ -239,8 +238,7 @@ void UpdateCheckJob::handleExtensionUpdates( const uno::Sequence< beans::NamedVa
     }
     catch( const uno::Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("extensions.update", "Caught exception, thread terminated. " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("extensions.update", "Caught exception, thread terminated");
     }
 }
 
diff --git a/extensions/source/update/feed/test/updatefeedtest.cxx b/extensions/source/update/feed/test/updatefeedtest.cxx
index 6e6c944fa70c..119aab24a3d1 100644
--- a/extensions/source/update/feed/test/updatefeedtest.cxx
+++ b/extensions/source/update/feed/test/updatefeedtest.cxx
@@ -72,7 +72,7 @@ SAL_IMPLEMENT_MAIN()
     }
     catch( const uno::Exception & )
     {
-        SAL_WARN("extensions.update", "exception caught: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("extensions.update", "");
     }
     catch( ... )
     {
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 3004d346522e..22240779768d 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -733,8 +733,7 @@ ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, css::u
         }
         catch (const css::uno::Exception&)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("filter.icgm", exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("filter.icgm", "");
             nStatus = 0;
         }
     }
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index a0ab8c6318ab..29882d0d4029 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -155,8 +155,7 @@ OdfFlatXml::importer(
     }
     catch (const Exception &)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("filter.odfflatxml", exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("filter.odfflatxml", "");
         return false;
     }
     catch (const std::exception &exc)
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index df74b8aa4814..354124c0a10d 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -395,9 +395,8 @@ namespace XSLT
                     }
                 catch( const Exception& )
                     {
-                        css::uno::Any ex( cppu::getCaughtException() );
                         // something went wrong
-                        SAL_WARN("filter.xslt", exceptionToString(ex));
+                        TOOLS_WARN_EXCEPTION("filter.xslt", "");
                         return false;
                     }
             }
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 95a80552370c..a14d6367d3ca 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -606,8 +606,7 @@ namespace frm
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "forms.component", "OComboBoxModel::read: caught an exception while examining the aggregate's string item list! " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "forms.component", "OComboBoxModel::read: caught an exception while examining the aggregate's string item list" );
         }
 
         // Version
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 6c24a53dd812..d3d0cc184c7a 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -1087,8 +1087,7 @@ void SAL_CALL OInterfaceContainer::insertByName(const OUString& _rName, const An
     }
     catch( const Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("forms.misc", "OInterfaceContainer::insertByName: caught an exception! " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION("forms.misc", "OInterfaceContainer::insertByName" );
     }
     implInsert( m_aItems.size(), xElementProps, true, aElementMetaData.get(), true );
 }
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index d9154dba6175..101e07c9354d 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -481,8 +481,7 @@ sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos)
     }
     catch ( const uno::Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("formula.ui", "FormulaDlg_Impl::GetFunctionPos exception! " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("formula.ui", "FormulaDlg_Impl::GetFunctionPos");
     }
 
     return nFuncPos;
@@ -996,8 +995,7 @@ OUString FormulaDlg_Impl::RepairFormula(const OUString& aFormula)
     }
     catch ( const uno::Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("formula.ui", "FormulaDlg_Impl::RepairFormula exception! " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("formula.ui", "FormulaDlg_Impl::RepairFormula");
     }
     return aResult;
 }
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx
index 99e77fa496d5..fc6ba14c8488 100644
--- a/io/source/stm/opump.cxx
+++ b/io/source/stm/opump.cxx
@@ -125,8 +125,7 @@ void Pump::fireError( const  Any & exception )
         }
         catch ( const RuntimeException & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
         }
     }
 }
@@ -154,8 +153,7 @@ void Pump::fireClose()
             }
             catch ( const RuntimeException & )
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
+                TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
             }
         }
     }
@@ -172,8 +170,7 @@ void Pump::fireStarted()
         }
         catch ( const RuntimeException & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
         }
     }
 }
@@ -189,8 +186,7 @@ void Pump::fireTerminated()
         }
         catch ( const RuntimeException & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
         }
     }
 }
@@ -292,8 +288,7 @@ void Pump::run()
     {
         // we are the last on the stack.
         // this is to avoid crashing the program, when e.g. a bridge crashes
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
     }
 }
 
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index da4236dc610c..f9d46bc03f7f 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -266,14 +266,9 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
                                     comphelper::getProcessComponentContext() );
             aCnt.executeCommand( "delete", makeAny( true ) );
         }
-        catch( css::ucb::CommandAbortedException& )
-        {
-            SAL_WARN( "linguistic", "HangulHanjaOptionsDialog::OkHdl(): CommandAbortedException" );
-        }
         catch( ... )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "linguistic", "HangulHanjaOptionsDialog::OkHdl(): Any other exception " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "linguistic", "HangulHanjaOptionsDialog::OkHdl()" );
         }
     }
 
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 5817b745da78..247f430d9c06 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -943,9 +943,8 @@ void SAL_CALL GrammarCheckingIterator::processLinguServiceEvent(
         }
         catch (const ::uno::Exception &)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
             // ignore
-            SAL_WARN("linguistic", "processLinguServiceEvent: exception: " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("linguistic", "processLinguServiceEvent");
         }
     }
 }
@@ -1107,8 +1106,7 @@ void GrammarCheckingIterator::GetConfiguredGCSvcs_Impl()
     }
     catch (uno::Exception const &)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "linguistic", "exception caught. Failed to get configured services " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "linguistic", "exception caught. Failed to get configured services" );
     }
 
     {
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index 545327e36228..1151f31d1a6d 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -235,8 +235,7 @@ sal_Int32 TextField::insertAt(
     }
     catch( const Exception&  )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("oox", "OOX:  TextField::insertAt() exception " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("oox", "OOX:  TextField::insertAt()");
     }
 
     return nCharHeight;
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index cda8521cf338..45290aab3386 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -176,8 +176,7 @@ sal_Int32 TextRun::insertAt(
     }
     catch( const Exception&  )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("oox", "OOX: TextRun::insertAt() exception " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("oox", "OOX: TextRun::insertAt()");
     }
 
     return nCharHeight;
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 5adc2e69dba1..57606fa1ce0b 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -180,8 +180,7 @@ bool lclExtractRangeFromName( CellRangeAddress& orRangeAddr, const Reference< XM
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("oox", exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("oox", "");
     }
     return false;
 }
@@ -214,8 +213,7 @@ void lclPrepareConverter( PropertySet& rConverter, const Reference< XModel >& rx
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("oox", exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("oox", "");
     }
     rConverter.setProperty( PROP_XLA1Representation, rAddressString );
     rConverter.setProperty( PROP_ReferenceSheet, nRefSheet );
@@ -359,8 +357,7 @@ void ControlConverter::bindToSources( const Reference< XControlModel >& rxCtrlMo
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("oox", exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("oox", "");
     }
 
     // list entry source
@@ -2748,8 +2745,7 @@ Reference< XControlModel > EmbeddedForm::convertAndInsert( const EmbeddedControl
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("oox", "exception creating Control: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("oox", "exception creating Control");
     }
     return xRet;
 }
@@ -2775,8 +2771,7 @@ Reference< XIndexContainer > const & EmbeddedForm::createXForm()
         }
         catch (const Exception&)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("oox", "exception creating Form: " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("oox", "exception creating Form");
         }
         // always clear the forms supplier to not try to create the form again
         mxFormsSupp.clear();
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index cf0bdfed9659..776514612b70 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -458,8 +458,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
     }
     catch( uno::Exception& )
     {
-        SAL_WARN( "oox", "oox::ppt::PresentationFragmentHandler::EndDocument(), "
-                  "exception caught: " << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "oox", "oox::ppt::PresentationFragmentHandler::EndDocument()" );
     }
 }
 
@@ -509,8 +508,7 @@ void PresentationFragmentHandler::finalizeImport()
         }
         catch( uno::Exception& )
         {
-            SAL_WARN( "oox", "oox::ppt::PresentationFragmentHandler::finalizeImport(), "
-                        "exception caught: " << exceptionToString( cppu::getCaughtException() ) );
+            TOOLS_WARN_EXCEPTION( "oox", "oox::ppt::PresentationFragmentHandler::finalizeImport()" );
         }
         // todo error handling;
         if ( rxStatusIndicator.is() )
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 1c3b58be6274..615665d8ae3c 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -251,8 +251,7 @@ void SlideFragmentHandler::finalizeImport()
     }
     catch( uno::Exception& )
     {
-        SAL_WARN( "oox", "oox::ppt::SlideFragmentHandler::EndElement(), "
-                    "exception caught: " << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "oox", "oox::ppt::SlideFragmentHandler::EndElement()" );
     }
 }
 
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
index d8fccb56ff30..2c5ce3887299 100644
--- a/oox/source/vml/vmldrawing.cxx
+++ b/oox/source/vml/vmldrawing.cxx
@@ -307,8 +307,7 @@ Reference< XShape > Drawing::createAndInsertXControlShape( const ::oox::ole::Emb
     }
     catch (Exception const&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("oox", "exception inserting Shape: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("oox", "exception inserting Shape");
     }
     return xShape;
 }
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 7a2d7d45b27e..4977643c71a8 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -1142,8 +1142,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
     }
     catch(uno::Exception const &)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sc.core", "exception in WriteToSource " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sc.core", "WriteToSource");
     }
 }
 
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx
index dfca3600283a..2183233b0bee 100644
--- a/sc/source/filter/oox/excelfilter.cxx
+++ b/sc/source/filter/oox/excelfilter.cxx
@@ -97,8 +97,7 @@ bool ExcelFilter::importDocument()
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("sc", "exception when importing document properties " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("sc", "exception when importing document properties");
         }
         catch( ... )
         {
diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx
index a4f033510e6f..fdb7b15da2e2 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -737,8 +737,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
                 }
                 catch( Exception const & )
                 {
-                    css::uno::Any ex( cppu::getCaughtException() );
-                    SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown " << exceptionToString(ex) );
+                    TOOLS_WARN_EXCEPTION("sc", "PivotCacheField::createParentGroupField" );
                 }
                 SAL_WARN_IF( aAutoName.isEmpty(), "sc", "PivotCacheField::createParentGroupField - cannot find auto-generated group name" );
 
@@ -766,8 +765,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
             }
             catch( Exception const & )
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown " << exceptionToString(ex) );
+                TOOLS_WARN_EXCEPTION("sc", "PivotCacheField::createParentGroupField" );
             }
         }
         ++nIndex;
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 57aa6d71d4cc..70af552b730c 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -253,22 +253,19 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
     }
     catch( const packages::zip::ZipIOException& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sc.filter", "Zip exception caught while importing: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sc.filter", "Zip exception caught while importing");
 
         nReturn = ERRCODE_IO_BROKENPACKAGE;
     }
     catch( const io::IOException& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sc.filter", "IO exception caught while importing: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sc.filter", "IO exception caught while importing");
 
         nReturn = SCERR_IMPORT_OPEN;
     }
     catch( const uno::Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sc.filter", "uno exception caught while importing: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sc.filter", "uno exception caught while importing");
 
         nReturn = SCERR_IMPORT_UNKNOWN;
     }
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
index 52d8c5f1e1b5..0135865c361a 100644
--- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
+++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
@@ -70,8 +70,7 @@ void ScDrawModelBroadcaster::Notify( SfxBroadcaster&,
         }
         catch( const uno::RuntimeException& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN("sc.ui", "Runtime exception caught while notifying shape. : " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION("sc.ui", "Runtime exception caught while notifying shape");
         }
     }
 }
diff --git a/sd/source/core/CustomAnimationCloner.cxx b/sd/source/core/CustomAnimationCloner.cxx
index 4bad9c2328a2..15b8c377408b 100644
--- a/sd/source/core/CustomAnimationCloner.cxx
+++ b/sd/source/core/CustomAnimationCloner.cxx
@@ -123,8 +123,7 @@ namespace sd
         }
         catch( Exception& )
         {
-            SAL_WARN( "sd", "sd::CustomAnimationClonerImpl::Clone(), "
-                      "exception caught: " << exceptionToString( cppu::getCaughtException() ) );
+            TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationClonerImpl::Clone()" );
             Reference< XAnimationNode > xEmpty;
             return xEmpty;
         }
@@ -199,9 +198,7 @@ namespace sd
         }
         catch( Exception& )
         {
-            SAL_WARN( "sd", "sd::CustomAnimationClonerImpl::transformNode(), "
-                      "exception caught: "
-                      << exceptionToString( cppu::getCaughtException() ) );
+            TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationClonerImpl::transformNode()" );
         }
     }
 
@@ -266,9 +263,7 @@ namespace sd
         }
         catch( Exception& )
         {
-            SAL_WARN( "sd", "sd::CustomAnimationClonerImpl::transformValue(), "
-                      "exception caught: "
-                      << exceptionToString( cppu::getCaughtException() ) );
+            TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationClonerImpl::transformValue()" );
         }
 
         return rValue;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index c6aabb05b555..91cb60028dff 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -706,8 +706,7 @@ void SAL_CALL SdStyleSheet::release(  ) throw ()
     catch (RuntimeException const&)
     {
         // don't break throw ()
-        css::uno::Any ex(DbgGetCaughtException());
-        SAL_WARN( "sd", exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sd", "" );
     }
     OSL_ASSERT( mrBHelper.bDisposed );
     SdStyleSheetBase::release();
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index a3ff6259e9ad..c00b7970637c 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3037,8 +3037,7 @@ bool HtmlExport::checkFileExists( Reference< css::ucb::XSimpleFileAccess3 > cons
     }
     catch( css::uno::Exception& )
     {
-        SAL_WARN( "sd", "sd::HtmlExport::checkFileExists(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::HtmlExport::checkFileExists()" );
     }
 
     return false;
@@ -3088,8 +3087,7 @@ bool HtmlExport::checkForExistingFiles()
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::HtmlExport::checkForExistingFiles(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::HtmlExport::checkForExistingFiles()" );
         bFound = false;
     }
 
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index db4c55f538cd..99a78879557c 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -288,20 +288,17 @@ ErrCode ReadThroughComponent(
     }
     catch (const packages::zip::ZipIOException&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sd.filter", "Zip exception caught while importing: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION( "sd.filter", "Zip exception caught while importing");
         return ERRCODE_IO_BROKENPACKAGE;
     }
     catch (const io::IOException&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sd.filter", "IO exception caught while importing: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION( "sd.filter", "IO exception caught while importing");
         return SD_XML_READERROR;
     }
     catch (const uno::Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sd.filter", "uno exception caught while importing: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION( "sd.filter", "uno exception caught while importing");
         return SD_XML_READERROR;
     }
 
@@ -724,8 +721,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
         }
         catch (const Exception&)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "sd.filter","sd::SdXMLFilter::Import(), exception during clearing of unused named items " << exceptionToString(ex));
+            TOOLS_WARN_EXCEPTION( "sd.filter","sd::SdXMLFilter::Import(), exception during clearing of unused named items");
         }
     }
 
diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx
index acce1c481288..03b3dd84da01 100644
--- a/sd/source/helper/simplereferencecomponent.cxx
+++ b/sd/source/helper/simplereferencecomponent.cxx
@@ -54,8 +54,7 @@ void SimpleReferenceComponent::release()
         }
         catch (RuntimeException const &) // don't break throw ()
         {
-            css::uno::Any ex(DbgGetCaughtException());
-            SAL_WARN( "sd", exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sd", "" );
         }
     }
 
diff --git a/sd/source/ui/accessibility/AccessiblePageShape.cxx b/sd/source/ui/accessibility/AccessiblePageShape.cxx
index 34e5e505559c..5e22d74c1c00 100644
--- a/sd/source/ui/accessibility/AccessiblePageShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePageShape.cxx
@@ -194,8 +194,7 @@ sal_Int32 SAL_CALL AccessiblePageShape::getBackground()
     }
     catch (const css::beans::UnknownPropertyException&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sd", "caught exception due to unknown property " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sd", "caught exception due to unknown property");
         // Ignore exception and return default color.
     }
     return nColor;
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 4af7c2f3c5ce..58c7ecd3057d 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -166,8 +166,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
                 }
                 catch (const css::uno::Exception&)
                 {
-                    css::uno::Any ex( cppu::getCaughtException() );
-                    SAL_WARN( "sd", exceptionToString(ex) );
+                    TOOLS_WARN_EXCEPTION( "sd", "" );
                 }
             }
         }
@@ -231,8 +230,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
                     }
                     catch (const css::uno::Exception&)
                     {
-                        css::uno::Any ex( cppu::getCaughtException() );
-                        SAL_WARN( "sd", exceptionToString(ex) );
+                        TOOLS_WARN_EXCEPTION( "sd", "" );
                     }
                 }
 
@@ -279,8 +277,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
                     }
                     catch (const css::uno::Exception&)
                     {
-                        css::uno::Any ex( cppu::getCaughtException() );
-                        SAL_WARN( "sd", exceptionToString(ex) );
+                        TOOLS_WARN_EXCEPTION( "sd", "" );
                     }
                 }
             }
@@ -352,8 +349,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
                     }
                     catch (const css::uno::Exception&)
                     {
-                        css::uno::Any ex( cppu::getCaughtException() );
-                        SAL_WARN( "sd", exceptionToString(ex) );
+                        TOOLS_WARN_EXCEPTION( "sd", "" );
                     }
                 }
                 if( !sUrl2.isEmpty() )
@@ -396,8 +392,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
                     }
                     catch (const css::uno::Exception&)
                     {
-                        css::uno::Any ex( cppu::getCaughtException() );
-                        SAL_WARN( "sd", exceptionToString(ex) );
+                        TOOLS_WARN_EXCEPTION( "sd", "" );
                     }
                 }
                 if( !sUrl3.isEmpty() )
@@ -440,8 +435,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
                     }
                     catch (const css::uno::Exception&)
                     {
-                        css::uno::Any ex( cppu::getCaughtException() );
-                        SAL_WARN( "sd", exceptionToString(ex) );
+                        TOOLS_WARN_EXCEPTION( "sd", "" );
                     }
                 }
                 if( !sUrl4.isEmpty() )
@@ -486,8 +480,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
                     }
                     catch (const css::uno::Exception&)
                     {
-                        css::uno::Any ex( cppu::getCaughtException() );
-                        SAL_WARN( "sd", exceptionToString(ex) );
+                        TOOLS_WARN_EXCEPTION( "sd", "" );
                     }
                 }
             }
diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx
index 104cb91e152d..3e8c90562590 100644
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -228,8 +228,7 @@ void SAL_CALL ModuleController::requestResource (const OUString& rsResourceURL)
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sd.fwk", "caught exception while creating factory. " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sd.fwk", "caught exception while creating factory");
     }
 
     // Remember that this factory has been instanced.
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index cd8cadea074e..04128fa74b4f 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -146,9 +146,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
             }
             catch (Exception&)
             {
-                SAL_WARN("sdremote", "sd::SlideShowImpl::setPointerPosition(), "
-                                     "exception caught: "
-                                         << exceptionToString(cppu::getCaughtException()));
+                TOOLS_WARN_EXCEPTION("sdremote", "sd::SlideShowImpl::setPointerPosition()");
             }
 
             try
@@ -158,9 +156,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
             }
             catch (Exception&)
             {
-                SAL_WARN("sdremote", "sd::SlideShowImpl::setPointerMode(), "
-                                     "exception caught: "
-                                         << exceptionToString(cppu::getCaughtException()));
+                TOOLS_WARN_EXCEPTION("sdremote", "sd::SlideShowImpl::setPointerMode()");
             }
         }
 
@@ -179,8 +175,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
         }
         catch ( Exception& )
         {
-            SAL_WARN( "sdremote", "sd::SlideShowImpl::setPointerMode(), "
-                "exception caught: " << exceptionToString( cppu::getCaughtException() ));
+            TOOLS_WARN_EXCEPTION( "sdremote", "sd::SlideShowImpl::setPointerMode()" );
         }
 
         SAL_INFO( "sdremote", "Pointer dismissed, we hide the pointer on screen" );
@@ -204,8 +199,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
         }
         catch ( Exception& )
         {
-            SAL_WARN( "sdremote", "sd::SlideShowImpl::setPointerPosition(), "
-                "exception caught: " << exceptionToString( cppu::getCaughtException() ));
+            TOOLS_WARN_EXCEPTION( "sdremote", "sd::SlideShowImpl::setPointerPosition()" );
         }
     }
     else if ( aCommand[0] == "presentation_resume" )
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 88a235965f5c..9749dc1e1590 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -333,9 +333,7 @@ bool AnimationSlideController::getSlideAPI( sal_Int32 nSlideNumber, Reference< X
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::AnimationSlideController::getSlideAPI(), "
-                    "exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::AnimationSlideController::getSlideAPI()" );
     }
 
     return false;
@@ -627,8 +625,7 @@ void SAL_CALL SlideshowImpl::disposing()
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::stop(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::stop()" );
     }
 
     mxShow.clear();
@@ -839,8 +836,7 @@ bool SlideshowImpl::startPreview(
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::startPreview(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::startPreview()" );
         bRet = false;
     }
 
@@ -1039,8 +1035,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx const * pPresSettings )
     }
     catch (const Exception&)
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::startShow(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::startShow()" );
         bRet = false;
     }
 
@@ -1107,8 +1102,7 @@ bool SlideshowImpl::startShowImpl( const Sequence< beans::PropertyValue >& aProp
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::startShowImpl(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::startShowImpl()" );
         return false;
     }
 }
@@ -1141,8 +1135,7 @@ void SlideshowImpl::paint()
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::paint(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::paint()" );
     }
 }
 
@@ -1216,8 +1209,7 @@ void SlideshowImpl::removeShapeEvents()
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::removeShapeEvents(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::removeShapeEvents()" );
     }
 }
 
@@ -1248,8 +1240,7 @@ void SlideshowImpl::registerShapeEvents(sal_Int32 nSlideNumber)
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::registerShapeEvents(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::registerShapeEvents()" );
     }
 }
 
@@ -1320,8 +1311,7 @@ void SlideshowImpl::registerShapeEvents( Reference< XShapes > const & xShapes )
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::registerShapeEvents(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::registerShapeEvents()" );
     }
 }
 
@@ -1389,8 +1379,7 @@ void SAL_CALL SlideshowImpl::pause()
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::pause(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::pause()" );
     }
 }
 
@@ -1419,8 +1408,7 @@ void SAL_CALL SlideshowImpl::resume()
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::resume(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::resume()" );
     }
 #ifdef ENABLE_SDREMOTE
     RemoteServer::presentationStarted( this );
@@ -1728,8 +1716,7 @@ void SlideshowImpl::updateSlideShow()
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::updateSlideShow(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::updateSlideShow()" );
     }
 }
 
@@ -1853,8 +1840,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
     catch( Exception& )
     {
         bRet = false;
-        SAL_WARN( "sd", "sd::SlideshowImpl::keyInput(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::keyInput()" );
     }
 
     return bRet;
@@ -2234,8 +2220,7 @@ Reference< XSlideShow > SlideshowImpl::createSlideShow()
     }
     catch( uno::Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::createSlideShow(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::createSlideShow()" );
     }
 
     return xShow;
@@ -2413,8 +2398,7 @@ void SlideshowImpl::resize( const Size& rSize )
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::resize(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::resize()" );
     }
 }
 
@@ -2680,8 +2664,7 @@ void SAL_CALL SlideshowImpl::setUsePen( sal_Bool bMouseAsPen )
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::setUsePen(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::setUsePen()" );
     }
 }
 
@@ -2729,8 +2712,7 @@ void SlideshowImpl::setEraseAllInk(bool bEraseAllInk)
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd.slideshow", "sd::SlideshowImpl::setEraseAllInk(), "
-            "exception caught: " << exceptionToString( cppu::getCaughtException() ));
+        TOOLS_WARN_EXCEPTION( "sd.slideshow", "sd::SlideshowImpl::setEraseAllInk()" );
     }
 }
 
@@ -2929,8 +2911,7 @@ void SlideshowImpl::gotoPreviousSlide (const bool bSkipAllMainSequenceEffects)
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::gotoPreviousSlide(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::gotoPreviousSlide()" );
     }
 }
 
@@ -3014,8 +2995,7 @@ void SAL_CALL SlideshowImpl::stopSound(  )
     }
     catch( Exception& )
     {
-        SAL_WARN( "sd", "sd::SlideshowImpl::stopSound(), exception caught: "
-                    << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::stopSound()" );
     }
 }
 
diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx
index c2623b53ecdd..60599ac0ef91 100644
--- a/sd/source/ui/tools/ConfigurationAccess.cxx
+++ b/sd/source/ui/tools/ConfigurationAccess.cxx
@@ -108,8 +108,7 @@ Any ConfigurationAccess::GetConfigurationNode (
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sd", "caught exception while getting configuration node" << sPathToNode << ": " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sd", "caught exception while getting configuration node" << sPathToNode);
     }
 
     return Any();
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 65ee9e8cd2ce..2ed605bc2bf9 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -429,8 +429,7 @@ void DrawController::FireSwitchCurrentPage (SdPage* pNewCurrentPage) throw()
     }
     catch (const uno::Exception&)
     {
-        css::uno::Any ex(DbgGetCaughtException());
-        SAL_WARN("sd", "sd::SdUnoDrawView::FireSwitchCurrentPage(), exception caught:  " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sd", "sd::SdUnoDrawView::FireSwitchCurrentPage()");
     }
 }
 
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index ce0885f79af9..d4a7a150aa1a 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -331,8 +331,7 @@ void SAL_CALL SdXImpressDocument::release() throw ( )
         catch (const uno::RuntimeException&)
         {
             // don't break throw ()
-            css::uno::Any ex(DbgGetCaughtException());
-            SAL_WARN( "sd", exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sd", "" );
         }
     }
     SfxBaseModel::release();
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 4fb136fa9838..176f337868c0 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -251,8 +251,7 @@ void DrawViewShell::SelectionHasChanged()
     }
     catch( css::uno::Exception& )
     {
-        SAL_WARN( "sd", "sd::DrawViewShell::SelectionHasChanged(), exception caught: "
-                << exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "sd", "sd::DrawViewShell::SelectionHasChanged()" );
     }
 
     if( HasCurrentFunction() )
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index 32cad4b53a91..6dcd0528cde5 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -329,9 +329,8 @@ Reference< XInterface > ConfigurationAccess::GetConfigurationNode(
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sdext.minimizer", "caught exception while getting configuration node "
-                  << sPathToNode << " : " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sdext.minimizer", "caught exception while getting configuration node "
+                  << sPathToNode);
     }
     return xNode;
 }
diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx
index 12bd8496960b..8a91f7c3ac8f 100644
--- a/sdext/source/presenter/PresenterConfigurationAccess.cxx
+++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx
@@ -151,8 +151,7 @@ Any PresenterConfigurationAccess::GetConfigurationNode (
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sdext.presenter", "caught exception while getting configuration node " << sPathToNode << " : " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sdext.presenter", "caught exception while getting configuration node " << sPathToNode);
     }
 
     return Any();
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx
index db244d4a520a..10eec2e4b630 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -1062,8 +1062,7 @@ PresenterTextCaret::~PresenterTextCaret()
     }
     catch (uno::Exception const&)
     {
-        css::uno::Any ex(DbgGetCaughtException());
-        SAL_WARN("sdext.presenter", "unexpected exception in ~PresenterTextCaret " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sdext.presenter", "unexpected exception in ~PresenterTextCaret");
     }
 }
 
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 2247c4a72c94..a998b77b823c 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -97,8 +97,7 @@ namespace
         }
         catch( const uno::Exception& )
         {
-            css::uno::Any ex = cppu::getCaughtException();
-            SAL_WARN( "sfx.appl", exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sfx.appl", "" );
         }
 
         return bRet;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 88a2cd388c16..fc936519f8a5 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1410,8 +1410,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
             }
             catch( const css::uno::Exception& )
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN( "sfx.appl", "SfxApplication::OfaExec_Impl(SID_MORE_DICTIONARIES): caught an exception " << exceptionToString(ex) );
+                TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxApplication::OfaExec_Impl(SID_MORE_DICTIONARIES)" );
             }
             break;
         }
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 2019b5fe8972..54a4e4bb664e 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2029,8 +2029,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox()
             }
             catch( Exception const & )
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::InitOnStartupBox(): unexpected exception " << exceptionToString(ex) );
+                TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::InitOnStartupBox()" );
             }
             sModuleName = sTemp;
         }
@@ -2283,8 +2282,7 @@ IMPL_LINK( SfxHelpTextWindow_Impl, CheckHdl, Button*, pButton, void )
     }
     catch( Exception const & )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::CheckHdl(): unexpected exception " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::CheckHdl()" );
     }
 }
 
@@ -2440,8 +2438,7 @@ void SfxHelpTextWindow_Impl::GetFocus()
     }
     catch( Exception const & )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::GetFocus(): unexpected exception " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::GetFocus()" );
     }
 }
 
@@ -2528,8 +2525,7 @@ void SfxHelpTextWindow_Impl::SetPageStyleHeaderOff() const
     }
     catch( Exception const & )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): unexpected exception " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff()" );
     }
 
     SAL_WARN_IF( !bSetOff, "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): set off failed" );
@@ -3101,8 +3097,7 @@ void SfxHelpWindow_Impl::CloseWindow()
     }
     catch( Exception const & )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sfx.appl", "SfxHelpWindow_Impl::CloseWindow(): caught an exception " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpWindow_Impl::CloseWindow()" );
     }
 }
 
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index ee6fbb63e133..d709ed3591f2 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -410,8 +410,7 @@ static OUString getCurrentModuleIdentifier_Impl()
         }
         catch (const Exception&)
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "sfx.appl", "SfxHelp::getCurrentModuleIdentifier_Impl(): exception of XModuleManager::identify() " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelp::getCurrentModuleIdentifier_Impl(): exception of XModuleManager::identify()" );
         }
     }
 
@@ -488,8 +487,7 @@ OUString SfxHelp::GetHelpModuleName_Impl(const OUString& rHelpID)
             }
             catch (const Exception&)
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN( "sfx.appl", "SfxHelp::GetHelpModuleName_Impl(): " << exceptionToString(ex) );
+                TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelp::GetHelpModuleName_Impl()" );
             }
         }
     }
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index f77f5971fd65..0976c8f80f28 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -78,8 +78,7 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL )
         }
         catch( const uno::Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "sfx.bastyp", "GetResultSet: " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sfx.bastyp", "GetResultSet" );
         }
 
 
@@ -104,8 +103,7 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL )
             }
             catch( const uno::Exception& )
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN( "sfx.bastyp", "XContentAccess::next(): " << exceptionToString(ex) );
+                TOOLS_WARN_EXCEPTION( "sfx.bastyp", "XContentAccess::next()" );
             }
         }
     }
@@ -246,8 +244,7 @@ sal_Int64 SfxContentHelper::GetSize( const OUString& rContent )
     }
     catch( const uno::Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sfx.bastyp", exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sfx.bastyp", "" );
     }
     return nSize;
 }
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 0f1347693ad6..9d4225539351 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -1208,10 +1208,9 @@ BitmapEx ThumbnailView::readThumbnail(const OUString &msURL)
     }
     catch (const uno::Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sfx",
+        TOOLS_WARN_EXCEPTION("sfx",
             "caught exception while trying to access thumbnail of "
-            << msURL << ": " << exceptionToString(ex));
+            << msURL);
     }
 
     // Extract the image from the stream.
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 5c0a32d02a87..f9a11830e925 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -133,8 +133,7 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
     }
     catch (const Exception&)
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "fwk", "BackingWindow - caught an exception! " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "fwk", "BackingWindow" );
     }
 
     // fdo#34392: we do the layout dynamically, the layout depends on the font,
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 011135fab81b..ec6f145054a1 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -407,15 +407,13 @@ void SfxDocumentInfoItem::UpdateDocumentInfo(
             }
             catch ( Exception const & )
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while adding custom properties " << exceptionToString(ex) );
+                TOOLS_WARN_EXCEPTION( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while adding custom properties" );
             }
         }
     }
     catch ( Exception const & )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while removing custom properties " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while removing custom properties" );
     }
 }
 
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 402923c8dfa1..1b6b04db197e 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -490,8 +490,7 @@ void FileDialogHelper_Impl::updateExportButton()
         }
         catch( const IllegalArgumentException& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::updateExportButton: caught an exception " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::updateExportButton" );
         }
     }
 }
@@ -593,8 +592,7 @@ void FileDialogHelper_Impl::updatePreviewState( bool _bUpdatePreviewWindow )
     }
     catch( const Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::updatePreviewState: caught an exception " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::updatePreviewState" );
     }
 }
 
@@ -1293,8 +1291,7 @@ sal_Int16 FileDialogHelper_Impl::implDoExecute()
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute: caught an exception " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute" );
         }
     }
 
@@ -1322,8 +1319,7 @@ void FileDialogHelper_Impl::implStartExecute()
         }
         catch( const Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute: caught an exception " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute" );
         }
     }
 }
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 35952895e99c..1e5dca13b1e7 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -572,8 +572,7 @@ collectFilesFromStorage(uno::Reference<embed::XStorage> const& i_xStorage,
             o_rFiles.insert(styles);
         }
     } catch (const uno::Exception &) {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN("sfx", "collectFilesFromStorage: " << exceptionToString(ex));
+        TOOLS_WARN_EXCEPTION("sfx", "collectFilesFromStorage");
     }
 }
 
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index a78cacb43d13..129f256cfbe1 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1272,8 +1272,7 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand(bool bLoading, bool bN
         }
         catch ( const uno::Exception& )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "sfx.doc", "Locking exception: WebDAV while trying to lock the file " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sfx.doc", "Locking exception: WebDAV while trying to lock the file" );
         }
         return eResult;
     }
@@ -1524,8 +1523,7 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand(bool bLoading, bool bN
     }
     catch( const uno::Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sfx.doc", "Locking exception: high probability, that the content has not been created " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sfx.doc", "Locking exception: high probability, that the content has not been created" );
     }
 
     return eResult;
@@ -2987,8 +2985,7 @@ void SfxMedium::UnlockFile( bool bReleaseLockStream )
             }
             catch ( uno::Exception& )
             {
-                css::uno::Any ex( cppu::getCaughtException() );
-                SAL_WARN( "sfx.doc", "Locking exception: WebDAV while trying to lock the file " << exceptionToString(ex) );
+                TOOLS_WARN_EXCEPTION( "sfx.doc", "Locking exception: WebDAV while trying to lock the file" );
             }
         }
         return;
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 7da29f337d47..7f2e71dd45d2 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -1659,8 +1659,7 @@ void SfxDocTemplate_Impl::Rescan()
     }
     catch( const Exception& )
     {
-        css::uno::Any ex( cppu::getCaughtException() );
-        SAL_WARN( "sfx.doc", "SfxDocTemplate_Impl::Rescan: caught an exception while doing the update! " << exceptionToString(ex) );
+        TOOLS_WARN_EXCEPTION( "sfx.doc", "SfxDocTemplate_Impl::Rescan: caught an exception while doing the update" );
     }
 }
 
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index c30544803603..8ebe36e07cd5 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -773,8 +773,7 @@ bool SfxDocTplService_Impl::createFolder( const OUString& rNewFolderURL,
         }
         catch( Exception const & )
         {
-            css::uno::Any ex( cppu::getCaughtException() );
-            SAL_WARN( "sfx.doc", "createFolder(): Could not create new folder " << exceptionToString(ex) );
+            TOOLS_WARN_EXCEPTION( "sfx.doc", "createFolder(): Could not create new folder" );
         }
     }
     else if ( bCreateParent )
diff --git a/slideshow/source/engine/activitiesqueue.cxx b/slideshow/source/engine/activitiesqueue.cxx
index 191d2ef09981..3181e92175ff 100644
--- a/slideshow/source/engine/activitiesqueue.cxx
+++ b/slideshow/source/engine/activitiesqueue.cxx
@@ -118,7 +118,7 @@ namespace slideshow
                     // since this will also capture segmentation
                     // violations and the like. In such a case, we
                     // still better let our clients now...
-                    SAL_WARN( "slideshow", exceptionToString(cppu::getCaughtException()) );
+                    TOOLS_WARN_EXCEPTION( "slideshow", "" );
                 }
                 catch( SlideShowException& )
                 {
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index ed4d157c526f..a302b171c36c 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -210,7 +210,7 @@ bool AnimationBaseNode::init_st()
         mpActivity = createActivity();
     }
     catch (uno::Exception const&) {
-        SAL_WARN( "slideshow", exceptionToString(cppu::getCaughtException()) );
+        TOOLS_WARN_EXCEPTION( "slideshow", "" );
         // catch and ignore. We later handle empty activities, but for
         // other nodes to function properly, the core functionality of
         // this node must remain up and running.
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx
index a5609ae47a5c..d5596cdb7036 100644
--- a/slideshow/source/engine/eventqueue.cxx
+++ b/slideshow/source/engine/eventqueue.cxx
@@ -234,7 +234,7 @@ namespace slideshow
                         // since this will also capture segmentation
                         // violations and the like. In such a case, we
                         // still better let our clients now...
-                        SAL_WARN( "slideshow", exceptionToString( cppu::getCaughtException() ) );
+                        TOOLS_WARN_EXCEPTION( "slideshow", "" );
                     }
                     catch( SlideShowException& )
                     {
diff --git a/slideshow/source/engine/pointersymbol.cxx b/slideshow/source/engine/pointersymbol.cxx
index dbc7fed055d3..050e392d805d 100644
--- a/slideshow/source/engine/pointersymbol.cxx
+++ b/slideshow/source/engine/pointersymbol.cxx
@@ -127,7 +127,7 @@ void PointerSymbol::viewAdded( const UnoViewSharedPtr& rView )
     }
     catch( uno::Exception& )
     {
-        SAL_WARN( "slideshow", exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "slideshow", "" );
     }
 
     maViews.emplace_back( rView, sprite );
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
index c8e21b5c8e15..ef931979c643 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
@@ -935,7 +935,7 @@ std::shared_ptr<Activity> createDrawingLayerAnimActivity(
     catch( uno::Exception& )
     {
         // translate any error into empty factory product.
-        SAL_WARN( "slideshow", exceptionToString( cppu::getCaughtException() ) );
+        TOOLS_WARN_EXCEPTION( "slideshow", "" );
     }
 
     return pActivity;
diff --git a/slideshow/source/engine/shapes/externalshapebase.cxx b/slideshow/source/engine/shapes/externalshapebase.cxx
index 00ba2bb2c37b..6e557bb456de 100644
--- a/slideshow/source/engine/shapes/externalshapebase.cxx
+++ b/slideshow/source/engine/shapes/externalshapebase.cxx
@@ -108,7 +108,7 @@ namespace slideshow
             }
             catch (uno::Exception &)
             {
-                SAL_WARN( "slideshow", exceptionToString( cppu::getCaughtException() ) );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list