[Libreoffice-commits] core.git: basctl/source connectivity/source cui/source dbaccess/source drawinglayer/source editeng/source extensions/source forms/source fpicker/source reportdesign/source sfx2/source svtools/source svx/source toolkit/source unotools/source xmloff/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 26 18:09:23 UTC 2019


 basctl/source/accessibility/accessibledialogcontrolshape.cxx |    3 
 connectivity/source/commontools/conncleanup.cxx              |   13 ++--
 connectivity/source/commontools/dbtools.cxx                  |    2 
 connectivity/source/commontools/dbtools2.cxx                 |    2 
 connectivity/source/commontools/predicateinput.cxx           |    5 -
 connectivity/source/drivers/hsqldb/HDriver.cxx               |    6 -
 connectivity/source/sdbcx/VIndex.cxx                         |    3 
 cui/source/options/optpath.cxx                               |    2 
 dbaccess/source/core/api/query.cxx                           |    2 
 dbaccess/source/core/dataaccess/definitioncontainer.cxx      |    4 -
 dbaccess/source/core/dataaccess/documentdefinition.cxx       |    8 +-
 dbaccess/source/core/misc/ContainerMediator.cxx              |    2 
 dbaccess/source/ui/dlg/DbAdminImpl.cxx                       |    2 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx   |    5 -
 editeng/source/misc/hangulhanja.cxx                          |    7 +-
 extensions/source/abpilot/datasourcehandling.cxx             |    2 
 extensions/source/bibliography/formcontrolcontainer.cxx      |    3 
 extensions/source/bibliography/framectr.cxx                  |    3 
 extensions/source/dbpilots/commonpagesdbp.cxx                |    5 -
 extensions/source/dbpilots/controlwizard.cxx                 |   15 ++--
 extensions/source/propctrlr/cellbindinghandler.cxx           |    5 -
 extensions/source/propctrlr/cellbindinghelper.cxx            |   10 +--
 extensions/source/propctrlr/editpropertyhandler.cxx          |    5 -
 extensions/source/propctrlr/eformshelper.cxx                 |   34 +++++------
 extensions/source/propctrlr/eformspropertyhandler.cxx        |    6 -
 extensions/source/propctrlr/fontdialog.cxx                   |    2 
 extensions/source/propctrlr/formcomponenthandler.cxx         |   27 ++------
 extensions/source/propctrlr/formlinkdialog.cxx               |   13 ++--
 extensions/source/propctrlr/genericpropertyhandler.cxx       |    9 +-
 extensions/source/propctrlr/handlerhelper.cxx                |    2 
 extensions/source/propctrlr/listselectiondlg.cxx             |    5 -
 extensions/source/propctrlr/propcontroller.cxx               |    6 -
 extensions/source/propctrlr/pushbuttonnavigation.cxx         |   14 ++--
 extensions/source/propctrlr/submissionhandler.cxx            |    7 +-
 extensions/source/propctrlr/taborder.cxx                     |    5 -
 extensions/source/propctrlr/unourl.cxx                       |    3 
 extensions/source/propctrlr/xsddatatypes.cxx                 |   13 ++--
 extensions/source/propctrlr/xsdvalidationhelper.cxx          |   16 ++---
 extensions/source/update/check/updatehdl.cxx                 |    3 
 forms/source/component/Date.cxx                              |    3 
 forms/source/component/FormComponent.cxx                     |   18 +----
 forms/source/component/refvaluecomponent.cxx                 |    2 
 forms/source/richtext/featuredispatcher.cxx                  |    3 
 forms/source/richtext/richtextmodel.cxx                      |    3 
 forms/source/runtime/formoperations.cxx                      |    6 -
 fpicker/source/office/iodlg.cxx                              |    5 -
 reportdesign/source/core/api/ReportDefinition.cxx            |    2 
 reportdesign/source/core/sdr/UndoActions.cxx                 |    6 -
 reportdesign/source/ui/inspection/GeometryHandler.cxx        |    4 -
 reportdesign/source/ui/misc/RptUndo.cxx                      |    5 -
 reportdesign/source/ui/misc/UITools.cxx                      |    2 
 sfx2/source/control/thumbnailviewacc.cxx                     |    3 
 sfx2/source/dialog/filedlghelper.cxx                         |    8 +-
 sfx2/source/doc/objstor.cxx                                  |    2 
 svtools/source/brwbox/brwimpl.hxx                            |    3 
 svtools/source/control/valueacc.cxx                          |    3 
 svtools/source/misc/imageresourceaccess.cxx                  |    3 
 svtools/source/misc/templatefoldercache.cxx                  |    3 
 svx/source/accessibility/AccessibleControlShape.cxx          |    5 -
 svx/source/dialog/weldeditview.cxx                           |    3 
 svx/source/fmcomp/fmgridcl.cxx                               |    4 -
 svx/source/fmcomp/gridcell.cxx                               |    9 --
 svx/source/form/fmcontrolbordermanager.cxx                   |    7 +-
 svx/source/form/fmcontrollayout.cxx                          |    2 
 svx/source/form/fmdocumentclassification.cxx                 |    2 
 svx/source/form/fmobjfac.cxx                                 |    3 
 svx/source/form/fmpgeimp.cxx                                 |    2 
 svx/source/form/fmshimp.cxx                                  |    2 
 svx/source/form/fmtextcontrolfeature.cxx                     |    7 +-
 svx/source/form/fmtools.cxx                                  |    3 
 svx/source/form/fmundo.cxx                                   |   12 +--
 svx/source/form/formcontrolfactory.cxx                       |    2 
 svx/source/form/formfeaturedispatcher.cxx                    |    2 
 svx/source/form/formtoolbars.cxx                             |    3 
 svx/source/form/navigatortree.cxx                            |    3 
 svx/source/form/tabwin.cxx                                   |    3 
 svx/source/svdraw/svdouno.cxx                                |    2 
 svx/source/tbxctrls/tbxcolor.cxx                             |    2 
 toolkit/source/controls/accessiblecontrolcontext.cxx         |    3 
 toolkit/source/controls/controlmodelcontainerbase.cxx        |    2 
 toolkit/source/helper/formpdfexport.cxx                      |    2 
 unotools/source/misc/desktopterminationobserver.cxx          |    3 
 unotools/source/misc/sharedunocomponent.cxx                  |    5 -
 xmloff/source/forms/elementexport.cxx                        |    9 --
 xmloff/source/forms/formcellbinding.cxx                      |    9 +-
 85 files changed, 247 insertions(+), 227 deletions(-)

New commits:
commit df773dc769f6a0d676673ac9b5fc0e8132e435e6
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Thu Dec 26 09:22:30 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Dec 26 19:08:42 2019 +0100

    use more TOOLS_WARN_EXCEPTION
    
    so we get more useful log messages when stuff goes wrong
    
    Change-Id: Ia55db7ab1a4d79b0f281673fbbb06c61745fa89e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85829
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
index df8d4fd983dc..b48eb53a0d1a 100644
--- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx
+++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
@@ -32,6 +32,7 @@
 #include <toolkit/awt/vclxfont.hxx>
 #include <toolkit/helper/convert.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <i18nlangtag/languagetag.hxx>
@@ -192,7 +193,7 @@ OUString AccessibleDialogControlShape::GetModelStringProperty( OUString const &
     }
     catch ( const Exception& )
     {
-        OSL_FAIL( "AccessibleDialogControlShape::GetModelStringProperty: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "basctl", "AccessibleDialogControlShape::GetModelStringProperty" );
     }
 
     return sReturn;
diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx
index 2f646e0535ce..922551c470af 100644
--- a/connectivity/source/commontools/conncleanup.cxx
+++ b/connectivity/source/commontools/conncleanup.cxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/sdbc/XRowSet.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 
 namespace dbtools
@@ -55,7 +56,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OAutoConnectionDisposer::OAutoConnectionDisposer: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::OAutoConnectionDisposer" );
         }
     }
 
@@ -69,7 +70,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OAutoConnectionDisposer::startPropertyListening: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::startPropertyListening" );
         }
     }
 
@@ -90,7 +91,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OAutoConnectionDisposer::stopPropertyListening: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::stopPropertyListening" );
         }
     }
 
@@ -105,7 +106,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OAutoConnectionDisposer::startRowSetListening: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::startRowSetListening" );
         }
         m_bRSListening = true;
     }
@@ -120,7 +121,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OAutoConnectionDisposer::stopRowSetListening: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::stopRowSetListening" );
         }
         m_bRSListening = false;
     }
@@ -202,7 +203,7 @@ namespace dbtools
         }
         catch(Exception&)
         {
-            OSL_FAIL("OAutoConnectionDisposer::clearConnection: caught an exception!");
+            TOOLS_WARN_EXCEPTION("connectivity.commontools", "OAutoConnectionDisposer::clearConnection");
         }
     }
 
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 514b026b26c9..0bf66b360378 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1184,7 +1184,7 @@ try
 }
 catch(const Exception&)
 {
-    OSL_FAIL( "TransferFormComponentProperties: caught an exception!" );
+    TOOLS_WARN_EXCEPTION( "connectivity.commontools", "TransferFormComponentProperties" );
 }
 }
 
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 46832ede01a3..5986595517fc 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -479,7 +479,7 @@ namespace
                         }
                         catch(SQLException&)
                         {
-                            OSL_FAIL( "lcl_createSDBCXColumn: caught an exception!" );
+                            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "lcl_createSDBCXColumn" );
                         }
                     }
 
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 3e88af4e5e62..bfe19152f281 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -30,6 +30,7 @@
 #include <connectivity/sqlnode.hxx>
 #include <connectivity/PColumn.hxx>
 #include <comphelper/numbers.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <memory>
 
@@ -85,7 +86,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OPredicateInputController::getSeparatorChars: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OPredicateInputController::getSeparatorChars" );
         }
         return false;
     }
@@ -119,7 +120,7 @@ namespace dbtools
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OPredicateInputController::OPredicateInputController: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OPredicateInputController::OPredicateInputController" );
         }
     }
 
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 159856a5583b..de64ef4a14ef 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -646,7 +646,7 @@ namespace connectivity
                 }
                 catch(Exception&)
                 {
-                    OSL_FAIL( "ODriverDelegator::preCommit: caught an exception!" );
+                    TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "ODriverDelegator::preCommit" );
                 }
             }
         }
@@ -833,7 +833,7 @@ namespace connectivity
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "lcl_getSystemLocale: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "lcl_getSystemLocale" );
             }
             if ( sLocaleString.isEmpty() )
             {
@@ -863,7 +863,7 @@ namespace connectivity
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ODriverDelegator::onConnectedNewDatabase: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "ODriverDelegator::onConnectedNewDatabase" );
         }
     }
 
diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx
index 4939bb702085..6ea44120307e 100644
--- a/connectivity/source/sdbcx/VIndex.cxx
+++ b/connectivity/source/sdbcx/VIndex.cxx
@@ -26,6 +26,7 @@
 #include <connectivity/sdbcx/VCollection.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <TConnection.hxx>
+#include <tools/diagnose_ex.h>
 
 using namespace ::connectivity;
 using namespace ::dbtools;
@@ -152,7 +153,7 @@ Reference< css::container::XNameAccess > SAL_CALL OIndex::getColumns(  )
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "OIndex::getColumns: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OIndex::getColumns" );
     }
 
     return m_pColumns.get();
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 5f304327ce87..7fd41fa1ee49 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -644,7 +644,7 @@ void SvxPathTabPage::GetPathList(
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "SvxPathTabPage::GetPathList(): caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "cui.options", "SvxPathTabPage::GetPathList()" );
     }
 }
 
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index f8b60a76cb9e..51ad61d4c0ca 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -90,7 +90,7 @@ OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
         }
         catch(Exception&)
         {
-            OSL_FAIL("OQueryDescriptor_Base::OQueryDescriptor_Base: caught an exception!");
+            TOOLS_WARN_EXCEPTION("dbaccess", "OQueryDescriptor_Base::OQueryDescriptor_Base");
         }
 
         m_xCommandDefinition->addPropertyChangeListener(OUString(), this);
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 6cad0402cad4..1926d7e59348 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -488,7 +488,7 @@ namespace
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "lcl_ensureName: caught an exception while obtaining the current name!" );
+            TOOLS_WARN_EXCEPTION( "dbaccess", "lcl_ensureName: caught an exception while obtaining the current name!" );
         }
 
         // set the new name
@@ -503,7 +503,7 @@ namespace
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "lcl_ensureName: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "dbaccess", "lcl_ensureName" );
         }
         return false;
     }
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 1530618f4b62..44d017618149 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -642,7 +642,7 @@ namespace
                 }
                 catch ( const Exception& )
                 {
-                    OSL_FAIL( "PreserveVisualAreaSize::PreserveVisualAreaSize: caught an exception!" );
+                    TOOLS_WARN_EXCEPTION( "dbaccess", "PreserveVisualAreaSize::PreserveVisualAreaSize" );
                 }
             }
         }
@@ -657,7 +657,7 @@ namespace
                 }
                 catch ( const Exception& )
                 {
-                    OSL_FAIL( "PreserveVisualAreaSize::~PreserveVisualAreaSize: caught an exception!" );
+                    TOOLS_WARN_EXCEPTION( "dbaccess", "PreserveVisualAreaSize::~PreserveVisualAreaSize" );
                 }
             }
         }
@@ -687,7 +687,7 @@ namespace
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "LayoutManagerLock::LayoutManagerLock: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "dbaccess", "LayoutManagerLock::LayoutManagerLock" );
             }
         }
 
@@ -701,7 +701,7 @@ namespace
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "LayoutManagerLock::~LayoutManagerLock: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "dbaccess", "LayoutManagerLock::~LayoutManagerLock" );
             }
         }
     };
diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx
index 0b06d9404ffd..ac96e77f6a78 100644
--- a/dbaccess/source/core/misc/ContainerMediator.cxx
+++ b/dbaccess/source/core/misc/ContainerMediator.cxx
@@ -56,7 +56,7 @@ OContainerMediator::OContainerMediator( const Reference< XContainer >& _xContain
         }
         catch(Exception&)
         {
-            OSL_FAIL("OContainerMediator::OContainerMediator: caught an exception!");
+            TOOLS_WARN_EXCEPTION("dbaccess", "OContainerMediator::OContainerMediator");
         }
         osl_atomic_decrement( &m_refCount );
     }
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index d61c75314ecb..2645cd70373b 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -623,7 +623,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr
     }
     catch(Exception&)
     {
-        OSL_FAIL("IsReadOnly throws an exception!");
+        TOOLS_WARN_EXCEPTION("dbaccess", "IsReadOnly throws");
     }
 }
 
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index db5333541958..71598cabc92c 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -20,6 +20,7 @@
 #include <memory>
 #include "vclmetafileprocessor2d.hxx"
 #include <tools/gen.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/virdev.hxx>
 #include <vcl/gdimtf.hxx>
 #include <vcl/gradient.hxx>
@@ -1086,7 +1087,7 @@ namespace drawinglayer
                 }
                 catch(const uno::Exception&)
                 {
-                    OSL_FAIL("VclMetafileProcessor2D: No access to printable flag of Control, caught an exception!");
+                    TOOLS_WARN_EXCEPTION("drawinglayer", "VclMetafileProcessor2D: No access to printable flag of Control");
                 }
             }
 
@@ -1163,7 +1164,7 @@ namespace drawinglayer
                     }
                     catch( const uno::Exception& )
                     {
-                        OSL_FAIL("VclMetafileProcessor2D: Printing of Control failed, caught an exception!");
+                        TOOLS_WARN_EXCEPTION("drawinglayer", "VclMetafileProcessor2D: Printing of Control failed");
                     }
                 }
 
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 9db47c4b0f7b..c56ce846a57b 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -36,6 +36,7 @@
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <editeng/edtdlg.hxx>
 
@@ -420,7 +421,7 @@ namespace editeng
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "HangulHanjaConversion_Impl::implNextConvertibleUnit: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "editeng", "HangulHanjaConversion_Impl::implNextConvertibleUnit" );
 
             //!!! at least we want to move on in the text in order
             //!!! to avoid an endless loop...
@@ -609,7 +610,7 @@ namespace editeng
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "HangulHanjaConversion_Impl::implGetConversionDirectionForCurrentPortion: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "editeng", "HangulHanjaConversion_Impl::implGetConversionDirectionForCurrentPortion" );
             }
         }
 
@@ -930,7 +931,7 @@ namespace editeng
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "HangulHanjaConversion_Impl::OnFind: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "editeng", "HangulHanjaConversion_Impl::OnFind" );
             }
         }
     }
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index d2aa6e699168..d4cbc5842d37 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -213,7 +213,7 @@ namespace abp
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ODataSourceContext::ODataSourceContext: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.abpilot", "ODataSourceContext::ODataSourceContext" );
         }
     }
     ODataSourceContext::~ODataSourceContext()
diff --git a/extensions/source/bibliography/formcontrolcontainer.cxx b/extensions/source/bibliography/formcontrolcontainer.cxx
index 4a9c23d0c97d..29bd584bd662 100644
--- a/extensions/source/bibliography/formcontrolcontainer.cxx
+++ b/extensions/source/bibliography/formcontrolcontainer.cxx
@@ -20,6 +20,7 @@
 #include "formcontrolcontainer.hxx"
 #include <osl/diagnose.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <algorithm>
 
@@ -104,7 +105,7 @@ namespace bib
         }
         catch( const Exception&)
         {
-            OSL_FAIL( "FormControlContainer::implSetDesignMode: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.biblio", "FormControlContainer::implSetDesignMode" );
         }
     }
 
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 80d2ae7b8f52..fc963e1f149c 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -47,6 +47,7 @@
 #include <cppuhelper/supportsservice.hxx>
 #include <sot/exchange.hxx>
 #include <sot/formats.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/edit.hxx>
 #include <vcl/weld.hxx>
 #include <osl/mutex.hxx>
@@ -455,7 +456,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
             }
             catch( const uno::Exception& )
             {
-                OSL_FAIL( "BibFrameController_Impl::dispatch: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "extensions.biblio", "BibFrameController_Impl::dispatch" );
             }
 
             sal_uInt16 nCount = aStatusListeners.size();
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 30e76024218b..cf45bd1d1921 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 #include <comphelper/interaction.hxx>
 #include <connectivity/dbtools.hxx>
 #include <vcl/stdtext.hxx>
@@ -144,7 +145,7 @@ namespace dbp
         }
         catch(const Exception&)
         {
-            OSL_FAIL("OTableSelectionPage::initializePage: caught an exception!");
+            TOOLS_WARN_EXCEPTION("extensions.abpilot", "OTableSelectionPage::initializePage");
         }
     }
 
@@ -178,7 +179,7 @@ namespace dbp
         }
         catch(const Exception&)
         {
-            OSL_FAIL("OTableSelectionPage::commitPage: caught an exception!");
+            TOOLS_WARN_EXCEPTION("extensions.dbpilots", "OTableSelectionPage::commitPage");
         }
 
         return true;
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index 59ce90acbe7d..045f2924c8f7 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -19,6 +19,7 @@
 
 #include "controlwizard.hxx"
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
 #include <com/sun/star/sdb/DatabaseContext.hpp>
@@ -176,7 +177,7 @@ namespace dbp
             }
             catch(const Exception&)
             {
-                OSL_FAIL("OControlWizardPage::initializePage: caught an exception!");
+                TOOLS_WARN_EXCEPTION("extensions.dbpilots", "OControlWizardPage::initializePage");
             }
 
             INetURLObject aURL( sDataSource );
@@ -351,7 +352,7 @@ namespace dbp
         }
         catch(const Exception&)
         {
-            OSL_FAIL("OControlWizard::implDeterminePage: caught an exception!");
+            TOOLS_WARN_EXCEPTION("extensions.dbpilots", "OControlWizard::implDeterminePage");
         }
     }
 
@@ -386,7 +387,7 @@ namespace dbp
         }
         catch(const Exception&)
         {
-            OSL_FAIL("OControlWizard::getFormConnection: caught an exception!");
+            TOOLS_WARN_EXCEPTION("extensions.dbpilots", "OControlWizard::getFormConnection");
         }
         return xConn;
     }
@@ -416,7 +417,7 @@ namespace dbp
         }
         catch(const Exception&)
         {
-            OSL_FAIL("OControlWizard::setFormConnection: caught an exception!");
+            TOOLS_WARN_EXCEPTION( "extensions.dbpilots", "OControlWizard::setFormConnection");
         }
     }
 
@@ -566,7 +567,7 @@ namespace dbp
         catch(const SQLException& e) { aSQLException <<= e; }
         catch(const Exception&)
         {
-            OSL_FAIL("OControlWizard::initContext: could not retrieve the control context (caught an exception)!");
+            TOOLS_WARN_EXCEPTION( "extensions.dbpilots", "OControlWizard::initContext: could not retrieve the control context");
         }
 
         ::comphelper::disposeComponent(xStatement);
@@ -618,7 +619,7 @@ namespace dbp
         }
         catch(const Exception&)
         {
-            OSL_FAIL("OControlWizard::commitControlSettings: could not commit the basic control settings!");
+            TOOLS_WARN_EXCEPTION( "extensions.dbpilots", "OControlWizard::commitControlSettings: could not commit the basic control settings!");
         }
     }
 
@@ -643,7 +644,7 @@ namespace dbp
         }
         catch(const Exception&)
         {
-            OSL_FAIL("OControlWizard::initControlSettings: could not retrieve the basic control settings!");
+            TOOLS_WARN_EXCEPTION( "extensions.dbpilots", "OControlWizard::initControlSettings: could not retrieve the basic control settings!");
         }
     }
 
diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx
index 5db199db94ef..55ad72b82d3a 100644
--- a/extensions/source/propctrlr/cellbindinghandler.cxx
+++ b/extensions/source/propctrlr/cellbindinghandler.cxx
@@ -28,6 +28,7 @@
 #include <com/sun/star/table/CellAddress.hpp>
 #include <com/sun/star/inspection/XObjectInspectorUI.hpp>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 
 
 extern "C" void createRegistryInfo_CellBindingPropertyHandler()
@@ -220,7 +221,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "CellBindingPropertyHandler::impl_updateDependentProperty_nothrow: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "CellBindingPropertyHandler::impl_updateDependentProperty_nothrow" );
         }
     }
 
@@ -338,7 +339,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "CellBindingPropertyHandler::setPropertyValue: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "CellBindingPropertyHandler::setPropertyValue" );
         }
     }
 
diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx
index 7942a4200563..77e83b969c31 100644
--- a/extensions/source/propctrlr/cellbindinghelper.cxx
+++ b/extensions/source/propctrlr/cellbindinghelper.cxx
@@ -183,7 +183,7 @@ namespace pcr
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "CellBindingHelper::doConvertAddressRepresentations: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "CellBindingHelper::doConvertAddressRepresentations" );
             }
         }
 
@@ -310,7 +310,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "CellBindingHelper::getAddressFromCellBinding: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "CellBindingHelper::getAddressFromCellBinding" );
         }
 
         return bReturn;
@@ -360,7 +360,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "CellBindingHelper::getStringAddressFromCellListSource: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "CellBindingHelper::getStringAddressFromCellListSource" );
         }
 
         return sAddress;
@@ -432,7 +432,7 @@ namespace pcr
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "CellBindingHelper::isCellIntegerBindingAllowed: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "CellBindingHelper::isCellIntegerBindingAllowed" );
                     // are there really control models which survive isCellBindingAllowed, but don't have a ClassId
                     // property?
                 bAllow = false;
@@ -469,7 +469,7 @@ namespace pcr
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "CellBindingHelper::isCellBindingAllowed: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "CellBindingHelper::isCellBindingAllowed" );
                 bAllow = false;
             }
         }
diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx
index f60edd92e0af..fc088d95a39e 100644
--- a/extensions/source/propctrlr/editpropertyhandler.cxx
+++ b/extensions/source/propctrlr/editpropertyhandler.cxx
@@ -24,6 +24,7 @@
 
 #include <com/sun/star/inspection/XObjectInspectorUI.hpp>
 #include <com/sun/star/lang/NullPointerException.hpp>
+#include <tools/diagnose_ex.h>
 
 #define TEXTTYPE_SINGLELINE     0
 #define TEXTTYPE_MULTILINE      1
@@ -124,7 +125,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EditPropertyHandler::getPropertyValue: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EditPropertyHandler::getPropertyValue" );
         }
 
         return aReturn;
@@ -179,7 +180,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EditPropertyHandler::setPropertyValue: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EditPropertyHandler::setPropertyValue" );
         }
     }
 
diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx
index e3bf4bf07a53..62f16f437728 100644
--- a/extensions/source/propctrlr/eformshelper.cxx
+++ b/extensions/source/propctrlr/eformshelper.cxx
@@ -93,7 +93,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::isEForm: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::isEForm" );
         }
         return false;
     }
@@ -186,7 +186,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::canBindToDataType: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::canBindToDataType" );
         }
 
         return bCan;
@@ -203,7 +203,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::isListEntrySink: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::isListEntrySink" );
         }
         return bIs;
     }
@@ -310,7 +310,7 @@ namespace pcr
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "EFormsHelper::getFormModelNames: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getFormModelNames" );
             }
         }
     }
@@ -336,7 +336,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::getBindingNames: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getBindingNames" );
         }
     }
 
@@ -353,7 +353,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::getFormModelByName: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getFormModelByName" );
         }
         return xReturn;
     }
@@ -372,7 +372,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::getCurrentFormModel: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getCurrentFormModel" );
         }
         return xModel;
     }
@@ -389,7 +389,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::getCurrentFormModel: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getCurrentFormModel" );
         }
         return sModelName;
     }
@@ -406,7 +406,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::getCurrentBinding: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getCurrentBinding" );
         }
 
         return xBinding;
@@ -424,7 +424,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::getCurrentBindingName: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getCurrentBindingName" );
         }
         return sBindingName;
     }
@@ -442,7 +442,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::getCurrentListSourceBinding: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getCurrentListSourceBinding" );
         }
         return xReturn;
     }
@@ -459,7 +459,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::setListSourceBinding: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::setListSourceBinding" );
         }
     }
 
@@ -485,7 +485,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::setBinding: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::setBinding" );
         }
     }
 
@@ -618,7 +618,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::getModelElementUIName: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getModelElementUIName" );
         }
 
         return sUIName;
@@ -690,7 +690,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::getAllElementUINames: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::getAllElementUINames" );
         }
 
         _rElementNames.resize( rMapUINameToElement.size() );
@@ -720,7 +720,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::firePropertyChange: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::firePropertyChange" );
         }
     }
 
@@ -754,7 +754,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsHelper::firePropertyChanges: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsHelper::firePropertyChanges" );
         }
     }
 
diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx
index c177095641ef..d26b6fa57a1f 100644
--- a/extensions/source/propctrlr/eformspropertyhandler.cxx
+++ b/extensions/source/propctrlr/eformspropertyhandler.cxx
@@ -148,7 +148,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsPropertyHandler::getPropertyValue: caught an exception!"
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsPropertyHandler::getPropertyValue: caught exception!"
                 "(have been asked for the \"" <<_rPropertyName << "\" property.)");
         }
         return aReturn;
@@ -266,7 +266,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsPropertyHandler::setPropertyValue: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsPropertyHandler::setPropertyValue" );
         }
     }
 
@@ -523,7 +523,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EFormsPropertyHandler::onInteractivePropertySelection: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EFormsPropertyHandler::onInteractivePropertySelection" );
         }
 
         // something went wrong here ...(but has been asserted already)
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 1afb4c8e861c..093b466dc6bd 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -270,7 +270,7 @@ namespace pcr
         }
         catch (const Exception&)
         {
-            OSL_FAIL("ControlCharacterDialog::translatePropertiesToItems: caught an exception!");
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "ControlCharacterDialog::translatePropertiesToItems");
         }
 
         _pSet->DisableItem(SID_ATTR_CHAR_CJK_FONT);
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 38236bccc319..9b66c241c6af 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2001,8 +2001,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
-            OSL_FAIL( "FormComponentPropertyHandler::impl_updateDependentProperty_nothrow: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormComponentPropertyHandler::impl_updateDependentProperty_nothrow" );
         }
     }
 
@@ -2078,8 +2077,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
-            OSL_FAIL( "FormComponentPropertyHandler::onNewComponent: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormComponentPropertyHandler::onNewComponent" );
         }
     }
 
@@ -2333,8 +2331,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
-            OSL_FAIL( "FormComponentPropertyHandler::impl_getRowSet_nothrow: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormComponentPropertyHandler::impl_getRowSet_nothrow" );
         }
         return xReturn;
     }
@@ -2372,8 +2369,7 @@ namespace pcr
         }
         catch (const Exception&)
         {
-            DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
-            OSL_FAIL( "FormComponentPropertyHandler::impl_initFieldList_nothrow: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormComponentPropertyHandler::impl_initFieldList_nothrow" );
         }
     }
 
@@ -2422,8 +2418,7 @@ namespace pcr
             }
             catch( const Exception& )
             {
-                DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
-                OSL_FAIL( "FormComponentPropertyHandler::impl_ensureRowsetConnection_nothrow: caught an exception during error handling!" );
+                TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormComponentPropertyHandler::impl_ensureRowsetConnection_nothrow: caught an exception during error handling!" );
             }
             // additional info about what happened
             INetURLObject aParser( sDataSourceName );
@@ -2481,8 +2476,7 @@ namespace pcr
         }
         catch (const Exception&)
         {
-            DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
-            OSL_FAIL("FormComponentPropertyHandler::impl_describeCursorSource_nothrow: caught an exception !");
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormComponentPropertyHandler::impl_describeCursorSource_nothrow");
         }
     }
 
@@ -2656,8 +2650,7 @@ namespace pcr
         catch (const SQLException& e) { aErrorInfo = e; }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
-            OSL_FAIL( "FormComponentPropertyHandler::impl_dialogFilterOrSort_nothrow: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormComponentPropertyHandler::impl_dialogFilterOrSort_nothrow" );
         }
 
         if ( aErrorInfo.isValid() )
@@ -2745,8 +2738,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
-            OSL_FAIL( "FormComponentPropertyHandler::impl_dialogFormatting_nothrow: : caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormComponentPropertyHandler::impl_dialogFormatting_nothrow" );
         }
         return bChanged;
     }
@@ -3264,8 +3256,7 @@ namespace pcr
             }
             catch( const Exception& )
             {
-                DBG_UNHANDLED_EXCEPTION("extensions.propctrlr");
-                OSL_FAIL( "FormComponentPropertyHandler::impl_hasValidDataSourceSignature_nothrow: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormComponentPropertyHandler::impl_hasValidDataSourceSignature_nothrow" );
             }
         }
         return bHas;
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx
index 746b7e50a139..005c80d25853 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -24,6 +24,7 @@
 #include <strings.hrc>
 #include "formstrings.hxx"
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/svapp.hxx>
 #include <connectivity/dbtools.hxx>
 #include <connectivity/dbexception.hxx>
@@ -314,7 +315,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormLinkDialog::initializeLinks: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormLinkDialog::initializeLinks" );
         }
     }
 
@@ -363,7 +364,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormLinkDialog::getFormDataSourceType: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormLinkDialog::getFormDataSourceType" );
         }
         return sReturn;
     }
@@ -400,7 +401,7 @@ namespace pcr
         catch (const SQLException& e ) { aErrorInfo = e; }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormLinkDialog::getFormFields: caught a non-SQL exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormLinkDialog::getFormFields: caught a non-SQL exception!" );
         }
 
         if ( aErrorInfo.isValid() )
@@ -465,7 +466,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormLinkDialog::getCanonicUnderlyingTable: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormLinkDialog::getCanonicUnderlyingTable" );
         }
         return xTable;
     }
@@ -530,7 +531,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormLinkDialog::getExistingRelation: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormLinkDialog::getExistingRelation" );
         }
 
         return ( !_rLeftFields.empty() ) && ( !_rLeftFields[ 0 ].isEmpty() );
@@ -601,7 +602,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormLinkDialog::initializeSuggest: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "FormLinkDialog::initializeSuggest" );
         }
     }
 
diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx
index d30d80918077..2b04b7567bd2 100644
--- a/extensions/source/propctrlr/genericpropertyhandler.cxx
+++ b/extensions/source/propctrlr/genericpropertyhandler.cxx
@@ -39,6 +39,7 @@
 #include <comphelper/extract.hxx>
 #include <comphelper/types.hxx>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <algorithm>
 #include <o3tl/functional.hxx>
@@ -104,7 +105,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EnumRepresentation::EnumRepresentation: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EnumRepresentation::EnumRepresentation" );
         }
     }
 
@@ -118,7 +119,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EnumRepresentation::getDescriptions: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EnumRepresentation::getDescriptions" );
         }
 
         return std::vector< OUString >( aNames.begin(), aNames.end() );
@@ -134,7 +135,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "EnumRepresentation::impl_getValues: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "EnumRepresentation::impl_getValues" );
         }
     }
 
@@ -522,7 +523,7 @@ namespace pcr
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "GenericPropertyHandler::impl_ensurePropertyMap: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "GenericPropertyHandler::impl_ensurePropertyMap" );
             }
         }
     }
diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx
index 18a575d6dbad..148ac41e8a52 100644
--- a/extensions/source/propctrlr/handlerhelper.cxx
+++ b/extensions/source/propctrlr/handlerhelper.cxx
@@ -266,7 +266,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "PropertyHandler::getContextValueByName: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "PropertyHandler::getContextValueByName" );
         }
         return xI;
     }
diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx
index 29b3b19e3a58..4cd7d610fafb 100644
--- a/extensions/source/propctrlr/listselectiondlg.cxx
+++ b/extensions/source/propctrlr/listselectiondlg.cxx
@@ -23,6 +23,7 @@
 #include <strings.hrc>
 #include "formstrings.hxx"
 #include <comphelper/sequence.hxx>
+#include <tools/diagnose_ex.h>
 
 namespace pcr
 {
@@ -86,7 +87,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ListSelectionDialog::initialize: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "ListSelectionDialog::initialize" );
         }
     }
 
@@ -104,7 +105,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ListSelectionDialog::commitSelection: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "ListSelectionDialog::commitSelection" );
         }
     }
 
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 88b38e22c554..1b9e3f0f7851 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -426,7 +426,7 @@ namespace pcr
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "OPropertyBrowserController::suspendPropertyHandlers_nothrow: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "OPropertyBrowserController::suspendPropertyHandlers_nothrow" );
             }
         }
         return true;
@@ -1145,7 +1145,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OPropertyBrowserController::describePropertyLine: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "OPropertyBrowserController::describePropertyLine" );
         }
     }
 
@@ -1492,7 +1492,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OPropertyBrowserController::rebuildPropertyUI: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "OPropertyBrowserController::rebuildPropertyUI" );
         }
 
         getPropertyBox().ChangeEntry( aDescriptor );
diff --git a/extensions/source/propctrlr/pushbuttonnavigation.cxx b/extensions/source/propctrlr/pushbuttonnavigation.cxx
index 68e72ab9637e..9d6d63495ee0 100644
--- a/extensions/source/propctrlr/pushbuttonnavigation.cxx
+++ b/extensions/source/propctrlr/pushbuttonnavigation.cxx
@@ -91,7 +91,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "PushButtonNavigation::PushButtonNavigation: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "PushButtonNavigation::PushButtonNavigation" );
         }
     }
 
@@ -130,7 +130,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "PushButtonNavigation::getCurrentButtonType: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "PushButtonNavigation::getCurrentButtonType" );
         }
         return aReturn;
     }
@@ -162,7 +162,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "PushButtonNavigation::setCurrentButtonType: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "PushButtonNavigation::setCurrentButtonType" );
         }
     }
 
@@ -194,7 +194,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "PushButtonNavigation::getCurrentButtonTypeState: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "PushButtonNavigation::getCurrentButtonTypeState" );
         }
 
         return eState;
@@ -225,7 +225,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "PushButtonNavigation::getCurrentTargetURL: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "PushButtonNavigation::getCurrentTargetURL" );
         }
         return aReturn;
     }
@@ -242,7 +242,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "PushButtonNavigation::setCurrentTargetURL: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "PushButtonNavigation::setCurrentTargetURL" );
         }
     }
 
@@ -261,7 +261,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "PushButtonNavigation::setCurrentTargetURL: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "PushButtonNavigation::setCurrentTargetURL" );
         }
 
         return eState;
diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx
index 921008c42091..03452bd0638d 100644
--- a/extensions/source/propctrlr/submissionhandler.cxx
+++ b/extensions/source/propctrlr/submissionhandler.cxx
@@ -32,6 +32,7 @@
 #include <com/sun/star/inspection/XObjectInspectorUI.hpp>
 #include <com/sun/star/lang/NullPointerException.hpp>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 #include <rtl/ustrbuf.hxx>
 
 
@@ -82,7 +83,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "SubmissionHelper::canTriggerSubmissions: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "SubmissionHelper::canTriggerSubmissions" );
         }
         return false;
     }
@@ -159,7 +160,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "SubmissionPropertyHandler::getPropertyValue: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "SubmissionPropertyHandler::getPropertyValue" );
         }
 
         return aReturn;
@@ -204,7 +205,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "SubmissionPropertyHandler::setPropertyValue: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "SubmissionPropertyHandler::setPropertyValue" );
         }
     }
 
diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx
index 90d28f8794bc..960686e20323 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -30,6 +30,7 @@
 #include <com/sun/star/form/runtime/FormController.hpp>
 #include <osl/diagnose.h>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 
 namespace pcr
 {
@@ -195,7 +196,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "TabOrderDialog::FillList: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "TabOrderDialog::FillList" );
         }
 
         // select first entry
@@ -230,7 +231,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "TabOrderDialog::AutoOrderClickHdl: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "TabOrderDialog::AutoOrderClickHdl" );
         }
     }
 
diff --git a/extensions/source/propctrlr/unourl.cxx b/extensions/source/propctrlr/unourl.cxx
index 4af3d3146692..88c9630129e4 100644
--- a/extensions/source/propctrlr/unourl.cxx
+++ b/extensions/source/propctrlr/unourl.cxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/util/XURLTransformer.hpp>
 #include <comphelper/processfactory.hxx>
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 
 namespace pcr
@@ -53,7 +54,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "UnoURL::UnoURL: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "UnoURL::UnoURL" );
         }
     }
 
diff --git a/extensions/source/propctrlr/xsddatatypes.cxx b/extensions/source/propctrlr/xsddatatypes.cxx
index 7a0fb3ac718a..27a101d9999b 100644
--- a/extensions/source/propctrlr/xsddatatypes.cxx
+++ b/extensions/source/propctrlr/xsddatatypes.cxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <tools/debug.hxx>
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 
 namespace pcr
@@ -45,7 +46,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDDataType: getSave: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDDataType: getSave" );
         }
         return aReturn;
     }
@@ -74,7 +75,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDDataType::classify: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDDataType::classify" );
         }
         return nTypeClass;
     }
@@ -100,7 +101,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDDataType::setFacet: caught an exception - sure this is the right data type class for this property?" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDDataType::setFacet: caught an exception - sure this is the right data type class for this property?" );
         }
     }
 
@@ -114,7 +115,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDDataType::hasFacet: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDDataType::hasFacet" );
         }
         return bReturn;
     }
@@ -128,7 +129,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDDataType::getFacet: caught an exception - sure this is the right data type class for this property?" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDDataType::getFacet: caught an exception - sure this is the right data type class for this property?" );
         }
         return aReturn;
     }
@@ -174,7 +175,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDDataType::copyFacetsFrom: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDDataType::copyFacetsFrom" );
         }
     }
 
diff --git a/extensions/source/propctrlr/xsdvalidationhelper.cxx b/extensions/source/propctrlr/xsdvalidationhelper.cxx
index 5f34cad5415b..bf52801662d2 100644
--- a/extensions/source/propctrlr/xsdvalidationhelper.cxx
+++ b/extensions/source/propctrlr/xsdvalidationhelper.cxx
@@ -91,7 +91,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDValidationHelper::getAvailableDataTypeNames: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDValidationHelper::getAvailableDataTypeNames" );
         }
     }
 
@@ -148,7 +148,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDValidationHelper::getValidatingDataTypeName: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDValidationHelper::getValidatingDataTypeName" );
         }
         return sDataTypeName;
     }
@@ -170,7 +170,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDValidationHelper::getDataTypeByName: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDValidationHelper::getDataTypeByName" );
         }
 
         return pReturn;
@@ -205,7 +205,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDValidationHelper::cloneDataType: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDValidationHelper::cloneDataType" );
         }
         return true;
     }
@@ -230,7 +230,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDValidationHelper::removeDataTypeFromRepository: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDValidationHelper::removeDataTypeFromRepository" );
             return false;
         }
         return true;
@@ -312,7 +312,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDValidationHelper::copyDataType: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDValidationHelper::copyDataType" );
         }
     }
 
@@ -364,7 +364,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDValidationHelper::findDefaultFormatForIntrospectee: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDValidationHelper::findDefaultFormatForIntrospectee" );
         }
     }
 
@@ -391,7 +391,7 @@ namespace pcr
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "XSDValidationHelper::getBasicTypeNameForClass: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "extensions.propctrlr", "XSDValidationHelper::getBasicTypeNameForClass" );
         }
 
         return sReturn;
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 9630a9395218..23b78f30bf55 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -63,6 +63,7 @@
 #include <strings.hrc>
 #include <unotools/resmgr.hxx>
 #include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/settings.hxx>
 #include <vcl/svapp.hxx>
 
@@ -711,7 +712,7 @@ void UpdateHandler::setControlProperty( const OUString &rCtrlName,
     }
     catch( const beans::UnknownPropertyException& )
     {
-        OSL_FAIL( "UpdateHandler::setControlProperty: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "extensions.update", "UpdateHandler::setControlProperty" );
     }
 }
 
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index fc6bc5ebfce7..c20011374243 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -20,6 +20,7 @@
 #include "Date.hxx"
 #include <services.hxx>
 #include <tools/date.hxx>
+#include <tools/diagnose_ex.h>
 #include <connectivity/dbconversion.hxx>
 #include <com/sun/star/sdbc/DataType.hpp>
 
@@ -93,7 +94,7 @@ ODateModel::ODateModel(const Reference<XComponentContext>& _rxFactory)
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "ODateModel::ODateModel: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "forms.component", "ODateModel::ODateModel" );
     }
     osl_atomic_decrement( &m_refCount );
 }
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index fb584d478ced..d683be633284 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -521,8 +521,7 @@ OControlModel::OControlModel(
                 }
                 catch( const Exception& )
                 {
-                    DBG_UNHANDLED_EXCEPTION("forms.component");
-                    SAL_WARN("forms.component",  "OControlModel::OControlModel: caught an exception!");
+                    TOOLS_WARN_EXCEPTION("forms.component",  "OControlModel::OControlModel");
                 }
             }
         }
@@ -2148,8 +2147,7 @@ void OBoundControlModel::doSetControlValue( const Any& _rValue )
 
     catch( const Exception& )
     {
-        DBG_UNHANDLED_EXCEPTION("forms.component");
-        SAL_WARN("forms.component",  "OBoundControlModel::doSetControlValue: caught an exception!");
+        TOOLS_WARN_EXCEPTION("forms.component",  "OBoundControlModel::doSetControlValue");
     }
 }
 
@@ -2169,8 +2167,7 @@ void OBoundControlModel::onConnectedValidator( )
 
     catch( const Exception& )
     {
-        DBG_UNHANDLED_EXCEPTION("forms.component");
-        SAL_WARN("forms.component",  "OBoundControlModel::onConnectedValidator: caught an exception!");
+        TOOLS_WARN_EXCEPTION("forms.component",  "OBoundControlModel::onConnectedValidator");
     }
 
     recheckValidity( false );
@@ -2189,8 +2186,7 @@ void OBoundControlModel::onDisconnectedValidator( )
 
     catch( const Exception& )
     {
-        DBG_UNHANDLED_EXCEPTION("forms.component");
-        SAL_WARN("forms.component",  "OBoundControlModel::onDisconnectedValidator: caught an exception!");
+        TOOLS_WARN_EXCEPTION("forms.component",  "OBoundControlModel::onDisconnectedValidator");
     }
 
     recheckValidity( false );
@@ -2463,8 +2459,7 @@ void OBoundControlModel::disconnectExternalValueBinding( )
 
     catch( const Exception& )
     {
-        DBG_UNHANDLED_EXCEPTION("forms.component");
-        SAL_WARN("forms.component",  "OBoundControlModel::disconnectExternalValueBinding: caught an exception!");
+        TOOLS_WARN_EXCEPTION("forms.component",  "OBoundControlModel::disconnectExternalValueBinding");
     }
 
     // if the binding also acts as our validator, disconnect the validator, too
@@ -2792,8 +2787,7 @@ void OBoundControlModel::recheckValidity( bool _bForceNotification )
 
     catch( const Exception& )
     {
-        DBG_UNHANDLED_EXCEPTION("forms.component");
-        SAL_WARN("forms.component",  "OBoundControlModel::recheckValidity: caught an exception!");
+        TOOLS_WARN_EXCEPTION("forms.component",  "OBoundControlModel::recheckValidity");
     }
 }
 
diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx
index 8321db5785cf..a4d8cb6561b2 100644
--- a/forms/source/component/refvaluecomponent.cxx
+++ b/forms/source/component/refvaluecomponent.cxx
@@ -251,7 +251,7 @@ namespace frm
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OReferenceValueComponent::translateControlValueToExternalValue: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "forms.component", "OReferenceValueComponent::translateControlValueToExternalValue" );
         }
 
         return aExternalValue;
diff --git a/forms/source/richtext/featuredispatcher.cxx b/forms/source/richtext/featuredispatcher.cxx
index ac425532f008..d667790c9756 100644
--- a/forms/source/richtext/featuredispatcher.cxx
+++ b/forms/source/richtext/featuredispatcher.cxx
@@ -19,6 +19,7 @@
 
 #include "featuredispatcher.hxx"
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 
 namespace frm
@@ -125,7 +126,7 @@ namespace frm
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "ORichTextFeatureDispatcher::doNotify: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "forms.richtext", "ORichTextFeatureDispatcher::doNotify" );
             }
         }
     }
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 9ec22b913924..866b62ae9484 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -30,6 +30,7 @@
 #include <svl/itempool.hxx>
 #include <toolkit/awt/vclxdevice.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
 #include <editeng/editstat.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/svapp.hxx>
@@ -515,7 +516,7 @@ namespace frm
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "ORichTextModel::getEditEngine: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "forms.richtext", "ORichTextModel::getEditEngine" );
             }
         }
         return pEngine;
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 7112a46b118f..1d89e1e2958e 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -380,7 +380,7 @@ namespace frm
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormOperations::getState: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "forms.runtime", "FormOperations::getState" );
         }
 
         return aState;
@@ -1249,7 +1249,7 @@ namespace frm
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormOperations::impl_ensureInitializedParser_nothrow: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "forms.runtime", "FormOperations::impl_ensureInitializedParser_nothrow" );
         }
 
         m_bInitializedParser = true;
@@ -1279,7 +1279,7 @@ namespace frm
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormOperations::impl_disposeParser_nothrow: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "forms.runtime", "FormOperations::impl_disposeParser_nothrow" );
         }
     }
 
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 7a28b76562b2..1915a1d66aa6 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -27,6 +27,7 @@
 #include "PlacesListBox.hxx"
 #include <fpsofficeResMgr.hxx>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 #include <tools/stream.hxx>
 #include <tools/urlobj.hxx>
 #include <vcl/graph.hxx>
@@ -245,7 +246,7 @@ namespace
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "lcl_getHomeDirectory: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "fpicker", "lcl_getHomeDirectory" );
         }
         return !_rHomeDir.isEmpty();
     }
@@ -1418,7 +1419,7 @@ void SvtFileDialog::displayIOException( const OUString& _rURL, IOErrorCode _eCod
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "iodlg::displayIOException: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "fpicker", "iodlg::displayIOException" );
     }
 }
 
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 8fcf9e1b9e3e..8daff443c111 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -224,7 +224,7 @@ static void lcl_extractAndStartStatusIndicator( const utl::MediaDescriptor& _rDe
     }
     catch (const uno::Exception&)
     {
-        OSL_FAIL( "lcl_extractAndStartStatusIndicator: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "reportdesign", "lcl_extractAndStartStatusIndicator" );
     }
 }
 
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index 86f617b239a7..836e8ed0a3d1 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -208,7 +208,7 @@ void OUndoContainerAction::Undo()
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OUndoContainerAction::Undo: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "reportdesign", "OUndoContainerAction::Undo" );
         }
     }
 }
@@ -236,7 +236,7 @@ void OUndoContainerAction::Redo()
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OUndoContainerAction::Redo: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "reportdesign", "OUndoContainerAction::Redo" );
         }
     }
 }
@@ -371,7 +371,7 @@ void ORptUndoPropertyAction::setProperty(bool _bOld)
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ORptUndoPropertyAction::Redo: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "reportdesign", "ORptUndoPropertyAction::Redo" );
         }
     }
 }
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index db98aa57bdec..fb7bdb9e503c 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1621,7 +1621,7 @@ bool GeometryHandler::impl_dialogFilter_nothrow( OUString& _out_rSelectedClause,
     catch (const sdbc::SQLException& e) { aErrorInfo = e; }
     catch( const uno::Exception& )
     {
-        OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "reportdesign", "GeometryHandler::impl_dialogFilter_nothrow" );
     }
 
     if ( aErrorInfo.isValid() )
@@ -2079,7 +2079,7 @@ void GeometryHandler::impl_initFieldList_nothrow( uno::Sequence< OUString >& _rF
     }
     catch (uno::Exception&)
     {
-        OSL_FAIL( "GeometryHandler::impl_initFieldList_nothrow: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "reportdesign", "GeometryHandler::impl_initFieldList_nothrow" );
     }
 }
 
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index 3320dc18b92a..43ff9cc1d1ac 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -32,6 +32,7 @@
 #include <comphelper/types.hxx>
 #include <svx/unoshape.hxx>
 #include <utility>
+#include <tools/diagnose_ex.h>
 #include <vcl/settings.hxx>
 
 #include <functional>
@@ -185,7 +186,7 @@ void OSectionUndo::Undo()
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "OSectionUndo::Undo: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "reportdesign", "OSectionUndo::Undo" );
     }
 }
 
@@ -206,7 +207,7 @@ void OSectionUndo::Redo()
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "OSectionUndo::Redo: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "reportdesign", "OSectionUndo::Redo" );
     }
 }
 
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 5f2ea6b38cfc..dd938af56233 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -1104,7 +1104,7 @@ bool openDialogFormula_nothrow( OUString& _in_out_rFormula
     catch (const sdbc::SQLException& e) { aErrorInfo = e; }
     catch( const uno::Exception& )
     {
-        OSL_FAIL( "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "reportdesign", "GeometryHandler::impl_dialogFilter_nothrow" );
     }
 
     if ( aErrorInfo.isValid() )
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index ccebccacbf81..53423bd567ae 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -27,6 +27,7 @@
 #include <vcl/settings.hxx>
 #include <sal/log.hxx>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
@@ -634,7 +635,7 @@ sal_Int32 SAL_CALL SfxThumbnailViewAcc::getAccessibleIndexInParent()
     }
     catch (const uno::Exception&)
     {
-        OSL_FAIL( "OAccessibleContextHelper::getAccessibleIndexInParent: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "sfx", "OAccessibleContextHelper::getAccessibleIndexInParent" );
     }
 
     return nRet;
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 18dbb9aa5dbb..f4bb29d89755 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -391,7 +391,7 @@ bool FileDialogHelper_Impl::updateExtendedControl( sal_Int16 _nExtendedControlId
         }
         catch( const IllegalArgumentException& )
         {
-            OSL_FAIL( "FileDialogHelper_Impl::updateExtendedControl: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "sfx", "FileDialogHelper_Impl::updateExtendedControl" );
         }
     }
     return bIsEnabled;
@@ -614,7 +614,7 @@ void FileDialogHelper_Impl::updateVersions()
                                                                 aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
                                                                 embed::ElementModes::READ );
 
-                DBG_ASSERT( xStorage.is(), "The method must return the storage or throw an exception!" );
+                DBG_ASSERT( xStorage.is(), "The method must return the storage or throw exception!" );
                 if ( !xStorage.is() )
                     throw uno::RuntimeException();
 
@@ -1701,7 +1701,7 @@ void FileDialogHelper_Impl::displayFolder( const OUString& _rPath )
         }
         catch( const IllegalArgumentException& )
         {
-            OSL_FAIL( "FileDialogHelper_Impl::displayFolder: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "sfx", "FileDialogHelper_Impl::displayFolder" );
         }
     }
 }
@@ -1718,7 +1718,7 @@ void FileDialogHelper_Impl::setFileName( const OUString& _rFile )
         }
         catch( const IllegalArgumentException& )
         {
-            OSL_FAIL( "FileDialogHelper_Impl::setFileName: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "sfx", "FileDialogHelper_Impl::setFileName" );
         }
     }
 }
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index deba40fc9f74..ee0808ff9e80 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3095,7 +3095,7 @@ uno::Reference< embed::XStorage > const & SfxObjectShell::GetStorage()
         try {
             // no notification is required the storage is set the first time
             pImpl->m_xDocStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
-            OSL_ENSURE( pImpl->m_xDocStorage.is(), "The method must either return storage or throw an exception!" );
+            OSL_ENSURE( pImpl->m_xDocStorage.is(), "The method must either return storage or throw exception!" );
 
             SetupStorage( pImpl->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false );
             pImpl->m_bCreateTempStor = false;
diff --git a/svtools/source/brwbox/brwimpl.hxx b/svtools/source/brwbox/brwimpl.hxx
index 06fb16c67016..aae0a4dd9f25 100644
--- a/svtools/source/brwbox/brwimpl.hxx
+++ b/svtools/source/brwbox/brwimpl.hxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/accessibility/XAccessible.hpp>
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 #include <map>
 
@@ -48,7 +49,7 @@ namespace svt
                     }
                     catch( const css::uno::Exception& )
                     {
-                        OSL_FAIL( "THeaderCellMapFunctorDispose: caught an exception!" );
+                        TOOLS_WARN_EXCEPTION( "svtools", "THeaderCellMapFunctorDispose" );
                     }
             }
         };
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index 869dc818061c..0b1e412ea3f4 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -22,6 +22,7 @@
 #include <vcl/settings.hxx>
 #include <sal/log.hxx>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 #include <svtools/valueset.hxx>
 #include "valueimp.hxx"
 #include <comphelper/servicehelper.hxx>
@@ -1587,7 +1588,7 @@ sal_Int32 SAL_CALL SvtValueSetAcc::getAccessibleIndexInParent()
     }
     catch (const uno::Exception&)
     {
-        OSL_FAIL( "OAccessibleContextHelper::getAccessibleIndexInParent: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svtools", "OAccessibleContextHelper::getAccessibleIndexInParent" );
     }
 
     return nRet;
diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx
index 8f07e59b999b..cd9cfba3b45a 100644
--- a/svtools/source/misc/imageresourceaccess.cxx
+++ b/svtools/source/misc/imageresourceaccess.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/io/XStream.hpp>
 #include <osl/diagnose.h>
 #include <tools/stream.hxx>
+#include <tools/diagnose_ex.h>
 #include <unotools/streamwrap.hxx>
 #include <cppuhelper/implbase.hxx>
 
@@ -151,7 +152,7 @@ std::unique_ptr<SvStream> getImageStream(uno::Reference<uno::XComponentContext>
     }
     catch (const uno::Exception&)
     {
-        OSL_FAIL("GraphicAccess::getImageStream: caught an exception!");
+        TOOLS_WARN_EXCEPTION("svtools", "GraphicAccess::getImageStream");
         pMemBuffer.reset();
     }
 
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index 36761da02577..fc6f38a7985e 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -37,6 +37,7 @@
 #include <tools/time.hxx>
 #include <tools/urlobj.hxx>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 #include <unotools/pathoptions.hxx>
 
 #include <comphelper/processfactory.hxx>
@@ -592,7 +593,7 @@ namespace svt
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "TemplateFolderCacheImpl::implReadFolder: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svtools", "TemplateFolderCacheImpl::implReadFolder" );
             return false;
         }
         return true;
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 9b36c9b51263..647a75251036 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -50,6 +50,7 @@
 #include <vcl/svapp.hxx>
 #include <sal/log.hxx>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 #include <algorithm>
 
 using namespace ::accessibility;
@@ -682,7 +683,7 @@ bool AccessibleControlShape::ensureControlModelAccess()
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "AccessibleControlShape::ensureControlModelAccess: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svx", "AccessibleControlShape::ensureControlModelAccess" );
     }
 
     return m_xControlModel.is();
@@ -738,7 +739,7 @@ OUString AccessibleControlShape::getControlModelStringProperty( const OUString&
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "OAccessibleControlContext::getModelStringProperty: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svx", "OAccessibleControlContext::getModelStringProperty" );
     }
     return sReturn;
 }
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx
index 222a3db5747b..60887fc46f8c 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -37,6 +37,7 @@
 #include <sal/log.hxx>
 #include <svx/AccessibleTextHelper.hxx>
 #include <svx/weldeditview.hxx>
+#include <tools/diagnose_ex.h>
 #include <unotools/accessiblestatesethelper.hxx>
 #include <vcl/cursor.hxx>
 #include <vcl/event.hxx>
@@ -593,7 +594,7 @@ public:
         }
         catch (const css::uno::Exception&)
         {
-            OSL_FAIL("WeldEditAccessible::getAccessibleIndexInParent: caught an exception!");
+            TOOLS_WARN_EXCEPTION("svx", "WeldEditAccessible::getAccessibleIndexInParent");
         }
 
         return nRet;
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index b2c9cd46b0a4..69574776f876 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1483,7 +1483,7 @@ void FmGridControl::RowHeightChanged()
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FmGridControl::RowHeightChanged: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "FmGridControl::RowHeightChanged" );
         }
     }
 }
@@ -2051,7 +2051,7 @@ void FmGridControl::KeyInput( const KeyEvent& rKEvt )
                         }
                         catch(const Exception&)
                         {
-                            OSL_FAIL("exception occurred while deleting a column");
+                            TOOLS_WARN_EXCEPTION("svx", "exception occurred while deleting a column");
                         }
                     }
                 }
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 911d814285e2..0f58b708b2ba 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -131,8 +131,7 @@ namespace
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("svx");
-            OSL_FAIL( "getModelLineEndSetting: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "getModelLineEndSetting" );
         }
         return eFormat;
     }
@@ -579,8 +578,7 @@ DbCellControl::DbCellControl( DbGridColumn& _rColumn )
     }
     catch( const Exception& )
     {
-        DBG_UNHANDLED_EXCEPTION("svx");
-        OSL_FAIL( "DbCellControl::doPropertyListening: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svx", "DbCellControl::doPropertyListening" );
     }
 }
 
@@ -602,8 +600,7 @@ void DbCellControl::implDoPropertyListening(const OUString& _rPropertyName, bool
     }
     catch( const Exception& )
     {
-        DBG_UNHANDLED_EXCEPTION("svx");
-        OSL_FAIL( "DbCellControl::doPropertyListening: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svx", "DbCellControl::doPropertyListening" );
     }
 }
 
diff --git a/svx/source/form/fmcontrolbordermanager.cxx b/svx/source/form/fmcontrolbordermanager.cxx
index d49af12c95a4..92da9708bd11 100644
--- a/svx/source/form/fmcontrolbordermanager.cxx
+++ b/svx/source/form/fmcontrolbordermanager.cxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/awt/XTextComponent.hpp>
 #include <com/sun/star/awt/XListBox.hpp>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 #include <osl/diagnose.h>
 
 
@@ -240,7 +241,7 @@ namespace svxform
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ControlBorderManager::controlStatusGained: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "ControlBorderManager::controlStatusGained" );
         }
     }
 
@@ -264,7 +265,7 @@ namespace svxform
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ControlBorderManager::controlStatusLost: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "ControlBorderManager::controlStatusLost" );
         }
     }
 
@@ -413,7 +414,7 @@ namespace svxform
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ControlBorderManager::validityChanged: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "ControlBorderManager::validityChanged" );
         }
     }
 
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index 999b482625f2..187fbf87d487 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -280,7 +280,7 @@ namespace svxform
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ControlLayouter::initializeControlLayout: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "ControlLayouter::initializeControlLayout" );
         }
     }
 
diff --git a/svx/source/form/fmdocumentclassification.cxx b/svx/source/form/fmdocumentclassification.cxx
index 72974e70f0d8..b079a26f54bf 100644
--- a/svx/source/form/fmdocumentclassification.cxx
+++ b/svx/source/form/fmdocumentclassification.cxx
@@ -159,7 +159,7 @@ namespace svxform
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "DocumentClassification::classifyHostDocument: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "DocumentClassification::classifyHostDocument" );
         }
 
         return eType;
diff --git a/svx/source/form/fmobjfac.cxx b/svx/source/form/fmobjfac.cxx
index b698d43fd053..0fb1af632f87 100644
--- a/svx/source/form/fmobjfac.cxx
+++ b/svx/source/form/fmobjfac.cxx
@@ -99,8 +99,7 @@ namespace
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("svx");
-            OSL_FAIL( "lcl_initProperty: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "lcl_initProperty" );
         }
     }
 }
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index 9146fe6605fd..1cc539c58144 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -583,7 +583,7 @@ Reference< XForm >  FmFormPageImpl::findFormForDataSource(
     }
     catch(const Exception&)
     {
-        OSL_FAIL("FmFormPageImpl::findFormForDataSource: caught an exception!");
+        TOOLS_WARN_EXCEPTION("svx", "FmFormPageImpl::findFormForDataSource");
     }
 
     if (sLookupName == sFormDataSourceName)
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index dc436a2aec7c..845fbf030b85 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1410,7 +1410,7 @@ void FmXFormShell::ExecuteTabOrderDialog_Lock(const Reference<XTabControllerMode
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "FmXFormShell::ExecuteTabOrderDialog: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svx", "FmXFormShell::ExecuteTabOrderDialog" );
     }
 }
 
diff --git a/svx/source/form/fmtextcontrolfeature.cxx b/svx/source/form/fmtextcontrolfeature.cxx
index 9b7263408a7b..68bb8606a453 100644
--- a/svx/source/form/fmtextcontrolfeature.cxx
+++ b/svx/source/form/fmtextcontrolfeature.cxx
@@ -21,6 +21,7 @@
 #include <fmtextcontrolshell.hxx>
 
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 namespace svx
 {
@@ -50,7 +51,7 @@ namespace svx
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FmTextControlFeature::FmTextControlFeature: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "FmTextControlFeature::FmTextControlFeature" );
         }
         osl_atomic_decrement( &m_refCount );
     }
@@ -76,7 +77,7 @@ namespace svx
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FmTextControlFeature::dispatch: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "FmTextControlFeature::dispatch" );
         }
     }
 
@@ -106,7 +107,7 @@ namespace svx
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FmTextControlFeature::dispose: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "FmTextControlFeature::dispose" );
         }
     }
 
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index 6297a3d0e69f..0e3dd230e5f9 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -75,6 +75,7 @@
 #include <sfx2/bindings.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/stdtext.hxx>
 #include <vcl/svapp.hxx>
 
@@ -183,7 +184,7 @@ sal_Int32 getElementPos(const Reference< css::container::XIndexAccess>& xCont, c
             }
             catch(Exception&)
             {
-                OSL_FAIL( "getElementPos: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "svx", "getElementPos" );
             }
 
         }
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index d887bbad661f..de10047759c1 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -882,7 +882,7 @@ void FmXUndoEnvironment::switchListening( const Reference< XIndexContainer >& _r
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "FmXUndoEnvironment::switchListening: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svx", "FmXUndoEnvironment::switchListening" );
     }
 }
 
@@ -916,7 +916,7 @@ void FmXUndoEnvironment::switchListening( const Reference< XInterface >& _rxObje
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "FmXUndoEnvironment::switchListening: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svx", "FmXUndoEnvironment::switchListening" );
     }
 }
 
@@ -992,7 +992,7 @@ void FmUndoPropertyAction::Undo()
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FmUndoPropertyAction::Undo: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "FmUndoPropertyAction::Undo" );
         }
         rEnv.UnLock();
     }
@@ -1012,7 +1012,7 @@ void FmUndoPropertyAction::Redo()
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FmUndoPropertyAction::Redo: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "FmUndoPropertyAction::Redo" );
         }
         rEnv.UnLock();
     }
@@ -1162,7 +1162,7 @@ void FmUndoContainerAction::Undo()
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FmUndoContainerAction::Undo: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "FmUndoContainerAction::Undo" );
         }
         rEnv.UnLock();
     }
@@ -1190,7 +1190,7 @@ void FmUndoContainerAction::Redo()
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FmUndoContainerAction::Redo: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "FmUndoContainerAction::Redo" );
         }
         rEnv.UnLock();
     }
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index 32b5d31fb232..02a41bc866aa 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -214,7 +214,7 @@ namespace svxform
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "lcl_getDataSourceIndirectProperties: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "svx", "lcl_getDataSourceIndirectProperties" );
             }
             return aInfo;
         }
diff --git a/svx/source/form/formfeaturedispatcher.cxx b/svx/source/form/formfeaturedispatcher.cxx
index 50faf597c463..33071378326c 100644
--- a/svx/source/form/formfeaturedispatcher.cxx
+++ b/svx/source/form/formfeaturedispatcher.cxx
@@ -91,7 +91,7 @@ namespace svx
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "OSingleFeatureDispatcher::notifyStatus: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "svx", "OSingleFeatureDispatcher::notifyStatus" );
             }
         }
         else
diff --git a/svx/source/form/formtoolbars.cxx b/svx/source/form/formtoolbars.cxx
index 52ee51101681..d46e7cc1b343 100644
--- a/svx/source/form/formtoolbars.cxx
+++ b/svx/source/form/formtoolbars.cxx
@@ -21,6 +21,7 @@
 
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 #include <svx/svxids.hrc>
 
@@ -65,7 +66,7 @@ namespace svxform
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormToolboxes::toggleToolbox: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "FormToolboxes::toggleToolbox" );
         }
     }
 
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 6950633e383b..9c1dc3ca3dd3 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -52,6 +52,7 @@
 
 #include <svx/svxdlg.hxx>
 #include <svx/strings.hrc>
+#include <tools/diagnose_ex.h>
 #include <bitmaps.hlst>
 #include <vcl/treelistentry.hxx>
 #include <vcl/commandevent.hxx>
@@ -1191,7 +1192,7 @@ namespace svxform
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "NavigatorTree::doPaste: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "NavigatorTree::doPaste" );
         }
     }
 
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index b9caf389bd1f..25337d76c980 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -49,6 +49,7 @@
 #include <comphelper/property.hxx>
 #include <sfx2/frame.hxx>
 #include <svx/dataaccessdescriptor.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/svapp.hxx>
 #include <tabwin.hrc>
 
@@ -288,7 +289,7 @@ void FmFieldWin::UpdateContent(const css::uno::Reference< css::form::XForm > & x
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "FmTabWin::UpdateContent: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svx", "FmTabWin::UpdateContent" );
     }
 }
 
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index 37c6ccd94477..7e5e6e571d6e 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -195,7 +195,7 @@ SdrUnoObj::~SdrUnoObj()
     }
     catch( const uno::Exception& )
     {
-        OSL_FAIL( "SdrUnoObj::~SdrUnoObj: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "svx", "SdrUnoObj::~SdrUnoObj" );
     }
 }
 
diff --git a/svx/source/tbxctrls/tbxcolor.cxx b/svx/source/tbxctrls/tbxcolor.cxx
index 3a17e38820a4..f434c4334a9e 100644
--- a/svx/source/tbxctrls/tbxcolor.cxx
+++ b/svx/source/tbxctrls/tbxcolor.cxx
@@ -79,7 +79,7 @@ namespace svx
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "ToolboxAccess::toggleToolbox: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "svx", "ToolboxAccess::toggleToolbox" );
         }
     }
 
diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx b/toolkit/source/controls/accessiblecontrolcontext.cxx
index a47f04d8906e..f5343b552088 100644
--- a/toolkit/source/controls/accessiblecontrolcontext.cxx
+++ b/toolkit/source/controls/accessiblecontrolcontext.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
 #include <vcl/window.hxx>
 
 
@@ -211,7 +212,7 @@ namespace toolkit
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "OAccessibleControlContext::getModelStringProperty: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "toolkit", "OAccessibleControlContext::getModelStringProperty" );
         }
         return sReturn;
     }
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index fc0643a871d4..a3f79e893cff 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -832,7 +832,7 @@ void SAL_CALL ControlModelContainerBase::getGroup( sal_Int32 _nGroup, Sequence<
 
     if ( ( _nGroup < 0 ) || ( _nGroup >= static_cast<sal_Int32>(maGroups.size()) ) )
     {
-        SAL_WARN("toolkit", "invalid argument and I am not allowed to throw an exception!" );
+        SAL_WARN("toolkit", "invalid argument and I am not allowed to throw exception!" );
         _rGroup.realloc( 0 );
         _rName.clear();
     }
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index 7394a442cef7..dc1f02f12e77 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -636,7 +636,7 @@ namespace toolkitform
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "describePDFControl: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "toolkit", "describePDFControl" );
         }
         return Descriptor;
     }
diff --git a/unotools/source/misc/desktopterminationobserver.cxx b/unotools/source/misc/desktopterminationobserver.cxx
index 2984324caa87..f5ea04bd49ed 100644
--- a/unotools/source/misc/desktopterminationobserver.cxx
+++ b/unotools/source/misc/desktopterminationobserver.cxx
@@ -25,6 +25,7 @@
 #include <cppuhelper/implbase.hxx>
 #include <comphelper/processfactory.hxx>
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 #include <vector>
 
@@ -101,7 +102,7 @@ namespace utl
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "OObserverImpl::ensureObservation: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "unotools", "OObserverImpl::ensureObservation" );
             }
         }
 
diff --git a/unotools/source/misc/sharedunocomponent.cxx b/unotools/source/misc/sharedunocomponent.cxx
index 6572d5a86fef..7580fdced945 100644
--- a/unotools/source/misc/sharedunocomponent.cxx
+++ b/unotools/source/misc/sharedunocomponent.cxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/util/XCloseable.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
 
 namespace utl
 {
@@ -59,7 +60,7 @@ namespace utl
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "DisposableComponent::~DisposableComponent: caught an exception!" );
+                TOOLS_WARN_EXCEPTION( "unotools", "DisposableComponent::~DisposableComponent" );
             }
             m_xComponent.clear();
         }
@@ -155,7 +156,7 @@ namespace utl
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "CloseableComponentImpl::impl_nf_switchListening: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "unotools", "CloseableComponentImpl::impl_nf_switchListening" );
         }
     }
 
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 12e57e4228f9..caa11f84939e 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -1764,8 +1764,7 @@ namespace xmloff
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("xmloff.forms");
-            OSL_FAIL( "OControlExport::exportCellBindingAttributes: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "xmloff.forms", "OControlExport::exportCellBindingAttributes" );
         }
     }
 
@@ -1806,8 +1805,7 @@ namespace xmloff
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("xmloff.forms");
-            OSL_FAIL( "OControlExport::exportCellListSourceRange: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "xmloff.forms", "OControlExport::exportCellListSourceRange" );
         }
     }
 
@@ -1879,8 +1877,7 @@ namespace xmloff
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("xmloff.forms");
-            OSL_FAIL( "OColumnExport::controlHasActiveDataBinding: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "xmloff.forms", "OColumnExport::controlHasActiveDataBinding" );
         }
 
         return false;
diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx
index cc03bf95009b..a32239ee551b 100644
--- a/xmloff/source/forms/formcellbinding.cxx
+++ b/xmloff/source/forms/formcellbinding.cxx
@@ -28,6 +28,7 @@
 #include <com/sun/star/beans/NamedValue.hpp>
 #include "strings.hxx"
 #include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 #include <algorithm>
 
@@ -196,7 +197,7 @@ OUString FormCellBindingHelper::getStringAddressFromCellBinding( const Reference
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "FormCellBindingHelper::getStringAddressFromCellBinding: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "xmloff", "FormCellBindingHelper::getStringAddressFromCellBinding" );
     }
 
     return sAddress;
@@ -224,7 +225,7 @@ OUString FormCellBindingHelper::getStringAddressFromCellListSource( const Refere
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "FormCellBindingHelper::getStringAddressFromCellListSource: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "xmloff", "FormCellBindingHelper::getStringAddressFromCellListSource" );
     }
 
     return sAddress;
@@ -251,7 +252,7 @@ bool FormCellBindingHelper::isSpreadsheetDocumentWhichSupplies( const Reference<
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "FormCellBindingHelper::isSpreadsheetDocumentWhichSupplies: caught an exception!" );
+        TOOLS_WARN_EXCEPTION( "xmloff", "FormCellBindingHelper::isSpreadsheetDocumentWhichSupplies" );
     }
 
     return bYesItIs;
@@ -421,7 +422,7 @@ bool FormCellBindingHelper::doConvertAddressRepresentations( const OUString& _rI
         }
         catch( const Exception& )
         {
-            OSL_FAIL( "FormCellBindingHelper::doConvertAddressRepresentations: caught an exception!" );
+            TOOLS_WARN_EXCEPTION( "xmloff", "FormCellBindingHelper::doConvertAddressRepresentations" );
         }
     }
 


More information about the Libreoffice-commits mailing list