summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-30 14:19:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-01 09:28:52 +0100
commitd6d80c4e1783b4459bd4a8fbcbdfeebe416c1cb5 (patch)
tree995c41a30f4224233267a8cfb05da41ae8c10275
parentfastparser in XMLIndexTemplateContext (diff)
downloadcore-d6d80c4e1783b4459bd4a8fbcbdfeebe416c1cb5.tar.gz
core-d6d80c4e1783b4459bd4a8fbcbdfeebe416c1cb5.zip
OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTION
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--accessibility/source/extended/accessibleeditbrowseboxcell.cxx3
-rw-r--r--chart2/source/model/filter/XMLFilter.cxx2
-rw-r--r--chart2/source/tools/WrappedPropertySet.cxx4
-rw-r--r--chart2/workbench/addin/sampleaddin.cxx2
-rw-r--r--connectivity/source/commontools/DateConversion.cxx2
-rw-r--r--connectivity/source/commontools/dbexception.cxx3
-rw-r--r--connectivity/source/commontools/dbtools.cxx8
-rw-r--r--connectivity/source/commontools/predicateinput.cxx2
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx3
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageAccess.cxx7
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageMap.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/StorageFileAccess.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx7
-rw-r--r--connectivity/source/drivers/mork/MResultSet.cxx3
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx2
-rw-r--r--cui/source/dialogs/showcols.cxx6
-rw-r--r--cui/source/options/optasian.cxx7
-rw-r--r--cui/source/options/sdbcdriverenum.cxx3
-rw-r--r--dbaccess/source/core/dataaccess/ContentHelper.cxx3
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx4
-rw-r--r--dbaccess/source/filter/xml/dbloader2.cxx4
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlHierarchyCollection.cxx3
-rw-r--r--dbaccess/source/filter/xml/xmlQuery.cxx3
-rw-r--r--dbaccess/source/filter/xml/xmlTable.cxx5
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx2
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx2
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx5
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx5
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx2
-rw-r--r--editeng/source/misc/hangulhanja.cxx2
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx3
-rw-r--r--filter/source/svg/svgexport.cxx3
-rw-r--r--forms/source/component/Button.cxx2
-rw-r--r--forms/source/component/ComboBox.cxx2
-rw-r--r--forms/source/component/Currency.cxx3
-rw-r--r--forms/source/component/DatabaseForm.cxx4
-rw-r--r--forms/source/component/Grid.cxx3
-rw-r--r--forms/source/component/ImageControl.cxx2
-rw-r--r--forms/source/component/clickableimage.cxx3
-rw-r--r--forms/source/runtime/formoperations.cxx7
-rw-r--r--forms/source/xforms/submission/submission_get.cxx3
-rw-r--r--forms/source/xforms/submission/submission_post.cxx3
-rw-r--r--forms/source/xforms/submission/submission_put.cxx3
-rw-r--r--fpicker/source/office/fpsmartcontent.cxx3
-rw-r--r--linguistic/source/gciterator.cxx2
-rw-r--r--oox/source/helper/binarystreambase.cxx5
-rw-r--r--oox/source/ppt/slidetransition.cxx5
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx6
-rw-r--r--reportdesign/source/core/api/FixedLine.cxx3
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx4
-rw-r--r--reportdesign/source/core/sdr/PropertyForward.cxx2
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlCell.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlComponent.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlCondPrtExpr.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlFormatCondition.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlFormattedField.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlFunction.cxx5
-rw-r--r--reportdesign/source/filter/xml/xmlGroup.cxx5
-rw-r--r--reportdesign/source/filter/xml/xmlHelper.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlImage.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlReport.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlReportElement.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlReportElementBase.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlSection.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlTable.cxx5
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx9
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx5
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx14
-rw-r--r--reportdesign/source/ui/misc/FunctionHelper.cxx3
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx10
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx6
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx12
-rw-r--r--sc/source/core/data/dpobject.cxx4
-rw-r--r--sc/source/core/data/globalx.cxx7
-rw-r--r--sc/source/core/tool/charthelper.cxx3
-rw-r--r--sc/source/core/tool/chartlock.cxx7
-rw-r--r--sc/source/filter/oox/pivottablebuffer.cxx3
-rw-r--r--sc/source/ui/dataprovider/sqldataprovider.cxx3
-rw-r--r--sc/source/ui/dbgui/dapidata.cxx5
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx3
-rw-r--r--sc/source/ui/docshell/docsh.cxx3
-rw-r--r--sc/source/ui/docshell/docsh4.cxx3
-rw-r--r--sc/source/ui/docshell/docsh8.cxx6
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx3
-rw-r--r--sc/source/ui/unoobj/celllistsource.cxx5
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx5
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx5
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx3
-rw-r--r--sc/source/ui/view/tabvwshb.cxx3
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.cxx2
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx67
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx32
-rw-r--r--sd/source/core/TransitionPreset.cxx3
-rw-r--r--sd/source/core/drawdoc3.cxx3
-rw-r--r--sd/source/core/drawdoc4.cxx3
-rw-r--r--sd/source/core/sdpage.cxx3
-rw-r--r--sd/source/core/stlpool.cxx5
-rw-r--r--sd/source/core/undoanim.cxx7
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx3
-rw-r--r--sd/source/filter/html/buttonset.cxx9
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx3
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx7
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx9
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx7
-rw-r--r--sd/source/ui/app/sdxfer.cxx3
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx4
-rw-r--r--sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx7
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx3
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx5
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx3
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx15
-rw-r--r--sd/source/ui/table/tablefunction.cxx3
-rw-r--r--sd/source/ui/unoidl/unopage.cxx5
-rw-r--r--sd/source/ui/view/drviews4.cxx3
-rw-r--r--sfx2/source/appl/newhelp.cxx14
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx8
-rw-r--r--sfx2/source/dialog/templdlg.cxx3
-rw-r--r--sfx2/source/doc/Metadatable.cxx9
-rw-r--r--sfx2/source/doc/docinsert.cxx5
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--sfx2/source/doc/printhelper.cxx15
-rw-r--r--sfx2/source/view/frame.cxx3
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx4
-rw-r--r--stoc/source/implementationregistration/implreg.cxx3
-rw-r--r--stoc/source/javavm/javavm.cxx8
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx4
-rw-r--r--svtools/source/brwbox/editbrowsebox2.cxx3
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx3
-rw-r--r--svx/source/form/fmsrcimp.cxx2
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx3
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx3
-rw-r--r--sw/source/core/unocore/swunohelper.cxx11
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx5
-rw-r--r--sw/source/core/unocore/unoport.cxx5
-rw-r--r--sw/source/filter/xml/xmlimp.cxx5
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx5
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx3
-rw-r--r--sw/source/ui/index/cntex.cxx5
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx5
-rw-r--r--sw/source/uibase/fldui/xfldui.cxx3
-rw-r--r--sw/source/uibase/uno/dlelstnr.cxx3
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx3
-rw-r--r--toolkit/source/controls/accessiblecontrolcontext.cxx2
-rw-r--r--toolkit/source/controls/filectrl.cxx3
-rw-r--r--ucb/source/ucp/tdoc/tdoc_stgelems.cxx2
-rw-r--r--unotools/source/config/confignode.cxx24
-rw-r--r--unotools/source/misc/sharedunocomponent.cxx2
-rw-r--r--unoxml/source/dom/documentbuilder.cxx2
-rw-r--r--uui/source/iahndl.cxx2
-rw-r--r--vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx5
-rw-r--r--vcl/win/dtrans/WinClipboard.cxx3
-rw-r--r--vcl/win/dtrans/XNotifyingDataObject.cxx3
-rw-r--r--vcl/win/dtrans/source.cxx3
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx16
-rw-r--r--writerfilter/source/dmapper/OLEHandler.cxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx10
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx8
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx5
165 files changed, 443 insertions, 382 deletions
diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
index 55016a749f04..7aefcc98bfad 100644
--- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
+++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
@@ -22,6 +22,7 @@
#include <extended/accessibleeditbrowseboxcell.hxx>
#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
namespace accessibility
{
@@ -224,7 +225,7 @@ namespace accessibility
}
catch( const Exception& )
{
- OSL_FAIL( "EditBrowseBoxTableCellAccess::disposing: caught an exception while disposing the context!" );
+ TOOLS_WARN_EXCEPTION( "accessibility", "EditBrowseBoxTableCellAccess::disposing: caught an exception while disposing the context!" );
}
}
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index 22291fac852e..ec1bf1f8b3a3 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -569,7 +569,7 @@ ErrCode XMLFilter::impl_Export(
}
catch (const uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "chart2", "Exception caught!");
}
}
diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx
index 26344a578adc..483c907a81b1 100644
--- a/chart2/source/tools/WrappedPropertySet.cxx
+++ b/chart2/source/tools/WrappedPropertySet.cxx
@@ -115,7 +115,7 @@ void SAL_CALL WrappedPropertySet::setPropertyValue( const OUString& rPropertyNam
catch( const uno::Exception& ex )
{
css::uno::Any anyEx = cppu::getCaughtException();
- OSL_FAIL("invalid exception caught in WrappedPropertySet::setPropertyValue");
+ TOOLS_WARN_EXCEPTION( "chart2", "invalid exception caught in WrappedPropertySet::setPropertyValue");
throw lang::WrappedTargetException( ex.Message, nullptr, anyEx );
}
}
@@ -152,7 +152,7 @@ Any SAL_CALL WrappedPropertySet::getPropertyValue( const OUString& rPropertyName
catch( const uno::Exception& ex )
{
css::uno::Any anyEx = cppu::getCaughtException();
- OSL_FAIL("invalid exception caught in WrappedPropertySet::setPropertyValue");
+ TOOLS_WARN_EXCEPTION( "chart2", "invalid exception caught in WrappedPropertySet::setPropertyValue");
throw lang::WrappedTargetException( ex.Message, nullptr, anyEx );
}
diff --git a/chart2/workbench/addin/sampleaddin.cxx b/chart2/workbench/addin/sampleaddin.cxx
index 665a205abd9d..5e3d23fd5fe6 100644
--- a/chart2/workbench/addin/sampleaddin.cxx
+++ b/chart2/workbench/addin/sampleaddin.cxx
@@ -55,7 +55,7 @@ sal_Bool SAL_CALL component_writeInfo(
}
catch( const registry::InvalidRegistryException& )
{
- OSL_FAIL( "### InvalidRegistryException!" );
+ TOOLS_WARN_EXCEPTION( "chart2", "" );
}
}
return sal_False;
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index 510736cc6a3f..09b80f62653c 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -433,7 +433,7 @@ OUString DBTypeConversion::getFormattedValue(const Reference< XPropertySet>& _xC
}
catch (const Exception& )
{
- OSL_FAIL("DBTypeConversion::getValue: caught an exception while asking for the format key!");
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "DBTypeConversion::getValue: caught an exception while asking for the format key!");
}
if (!nKey)
diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx
index f15237d82c88..2efc4a6976b3 100644
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/sdb/SQLErrorEvent.hpp>
#include <strings.hrc>
#include <resource/sharedresources.hxx>
+#include <tools/diagnose_ex.h>
namespace dbtools
{
@@ -197,7 +198,7 @@ void SQLExceptionInfo::append( TYPE _eType, const OUString& _rErrorMessage, cons
case TYPE::SQLWarning: aAppend <<= SQLWarning(); break;
case TYPE::SQLContext: aAppend <<= SQLContext(); break;
default:
- OSL_FAIL( "SQLExceptionInfo::append: invalid exception type: this will crash!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "SQLExceptionInfo::append: invalid exception type: this will crash!" );
break;
}
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index a94a99a6327c..d8ce3f42136e 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -345,7 +345,7 @@ Reference< XConnection> getConnection_withFeedback(const OUString& _rDataSourceN
}
catch(Exception&)
{
- OSL_FAIL("::dbtools::getConnection_withFeedback: unexpected (non-SQL) exception caught!");
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "::dbtools::getConnection_withFeedback: unexpected (non-SQL) exception caught!");
}
return xReturn;
}
@@ -463,7 +463,7 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet,
}
catch(Exception&)
{
- OSL_FAIL("EXception when we set the new active connection!");
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "EXception when we set the new active connection!");
}
}
}
@@ -717,7 +717,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect
catch( const SQLException& e ) { if ( _pErrorInfo ) *_pErrorInfo = SQLExceptionInfo( e ); }
catch( const Exception& )
{
- OSL_FAIL( "::dbtools::getFieldsByCommandDescriptor: caught an exception while retrieving the fields!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "::dbtools::getFieldsByCommandDescriptor: caught an exception while retrieving the fields!" );
}
return xFields;
@@ -1284,7 +1284,7 @@ Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer(
}
catch( const Exception& )
{
- OSL_FAIL( "::getCurrentSettingsComposer : caught an exception !" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "::getCurrentSettingsComposer : caught an exception !" );
}
return xReturn;
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 8ab37a3f76f3..f34ad6228532 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -211,7 +211,7 @@ namespace dbtools
}
catch( const Exception& )
{
- OSL_FAIL( "OPredicateInputController::implPredicateTree: caught an exception while dealing with the formats!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OPredicateInputController::implPredicateTree: caught an exception while dealing with the formats!" );
}
bool bDecDiffers = ( nCtxDecSep != nFmtDecSep );
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 134565e3e3de..982d0266b949 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -32,6 +32,7 @@
#include <file/FDateFunctions.hxx>
#include <file/FNumericFunctions.hxx>
#include <file/FConnection.hxx>
+#include <tools/diagnose_ex.h>
#include <sqlbison.hxx>
#include <strings.hrc>
@@ -451,7 +452,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode const * pPredicateNo
}
catch(Exception &)
{
- OSL_FAIL("OPredicateCompiler::execute_Operand Exception");
+ TOOLS_WARN_EXCEPTION( "connectivity.drivers", "OPredicateCompiler::execute_Operand Exception");
}
}
else if (SQL_ISRULE(pPredicateNode,parameter))
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index 7bb868d2ff1a..91b8324008e3 100644
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -22,6 +22,7 @@
#include <hsqldb/HStorageMap.hxx>
#include "accesslog.hxx"
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <string.h>
@@ -76,7 +77,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ
}
catch(const Exception&)
{
- OSL_FAIL( "NativeStorageAccess::close: caught an exception while flushing!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "NativeStorageAccess::close: caught an exception while flushing!" );
}
#ifdef HSQLDB_DBG
{
@@ -426,7 +427,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jstring name, jstring key
}
catch(const Exception& e)
{
- OSL_FAIL("Exception caught! : write [BII)V");
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "Exception caught! : write [BII)V");
StorageContainer::throwJavaException(e,env);
}
}
@@ -479,7 +480,7 @@ void write_to_storage_stream( JNIEnv* env, jstring name, jstring key, jint v )
}
catch(const Exception& e)
{
- OSL_FAIL("Exception caught! : writeBytes(aData);");
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "writeBytes(aData);");
StorageContainer::throwJavaException(e,env);
}
}
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index ade3133bd536..63b5e0481c5c 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -73,7 +73,7 @@ namespace connectivity::hsqldb
}
catch(const Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "");
}
}
diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
index 3e8461a95f8f..65457ab1d129 100644
--- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
@@ -159,7 +159,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora
}
catch(const Exception& e)
{
- OSL_FAIL("Exception caught! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement");
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement");
StorageContainer::throwJavaException(e,env);
}
}
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
index b16eaf742e1c..7ddf79aa5e77 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
@@ -27,6 +27,7 @@
#include <hsqldb/HStorageMap.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include "accesslog.hxx"
#include <limits>
@@ -173,7 +174,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stor
}
catch(const Exception& e)
{
- OSL_FAIL("Exception caught! : skip();");
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "skip();");
StorageContainer::throwJavaException(e,env);
}
}
@@ -216,7 +217,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora
}
catch(const Exception& e)
{
- OSL_FAIL("Exception caught! : available();");
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "available();");
StorageContainer::throwJavaException(e,env);
}
}
@@ -260,7 +261,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora
}
catch(const Exception& e)
{
- OSL_FAIL("Exception caught! : skip();");
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "skip();");
StorageContainer::throwJavaException(e,env);
}
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 4c51bf414e3f..6a6d14f63fb7 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -27,6 +27,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <o3tl/safeint.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <vector>
#include <algorithm>
@@ -1265,7 +1266,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow,
}
catch (Exception&)
{
- OSL_FAIL("OResultSet::setBoundedColumns: caught an Exception!");
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "OResultSet::setBoundedColumns");
}
}
}
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index afcb38279640..0edf495bd8ab 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -393,7 +393,7 @@ void OSDBCDriverManager::initializeDriverPrecedence()
}
catch (Exception&)
{
- OSL_FAIL("OSDBCDriverManager::initializeDriverPrecedence: caught an exception while sorting the drivers!");
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "OSDBCDriverManager::initializeDriverPrecedence: caught an exception while sorting the drivers!");
}
}
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index 6c92d00fc6b2..a567a84010dc 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/types.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#define CUIFM_PROP_HIDDEN "Hidden"
#define CUIFM_PROP_LABEL "Label"
@@ -60,7 +61,8 @@ IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk, weld::Button&, void)
}
catch (...)
{
- OSL_FAIL("FmShowColsDialog::OnClickedOk Exception occurred!");
+ TOOLS_WARN_EXCEPTION("cui.dialogs",
+ "FmShowColsDialog::OnClickedOk Exception occurred!");
}
}
}
@@ -96,7 +98,7 @@ void FmShowColsDialog::SetColumns(const css::uno::Reference<css::container::XInd
}
catch (...)
{
- OSL_FAIL("FmShowColsDialog::SetColumns Exception occurred!");
+ TOOLS_WARN_EXCEPTION("cui.dialogs", "FmShowColsDialog::SetColumns Exception occurred!");
}
// if the col is hidden, put it into the list
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 3e09e3779b81..1daf56dbb64b 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -22,6 +22,7 @@
#include <optasian.hxx>
#include <osl/diagnose.h>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <o3tl/any.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <svl/asiancfg.hxx>
@@ -183,7 +184,7 @@ bool SvxAsianLayoutPage::FillItemSet( SfxItemSet* )
}
catch (const Exception&)
{
- OSL_FAIL("exception in XForbiddenCharacters");
+ TOOLS_WARN_EXCEPTION( "cui.options", "in XForbiddenCharacters");
}
}
eLastUsedLanguageTypeForForbiddenCharacters = m_xLanguageLB->get_active_id();
@@ -310,7 +311,7 @@ IMPL_LINK_NOARG(SvxAsianLayoutPage, LanguageHdl, weld::ComboBox&, void)
}
catch (const Exception&)
{
- OSL_FAIL("exception in XForbiddenCharacters");
+ TOOLS_WARN_EXCEPTION( "cui.options", "in XForbiddenCharacters");
}
}
}
@@ -368,7 +369,7 @@ IMPL_LINK(SvxAsianLayoutPage, ModifyHdl, weld::Entry&, rEdit, void)
}
catch (const Exception&)
{
- OSL_FAIL("exception in XForbiddenCharacters");
+ TOOLS_WARN_EXCEPTION( "cui.options", "in XForbiddenCharacters");
}
}
pImpl->aConfig.SetStartEndChars( aLocale, bEnable ? &sStart : nullptr, bEnable ? &sEnd : nullptr);
diff --git a/cui/source/options/sdbcdriverenum.cxx b/cui/source/options/sdbcdriverenum.cxx
index 1370c93c254f..f6a0cf3ad1ee 100644
--- a/cui/source/options/sdbcdriverenum.cxx
+++ b/cui/source/options/sdbcdriverenum.cxx
@@ -20,6 +20,7 @@
#include "sdbcdriverenum.hxx"
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/sdbc/DriverManager.hpp>
@@ -66,7 +67,7 @@ namespace offapp
}
catch(const Exception&)
{
- OSL_FAIL("ODriverEnumerationImpl::ODriverEnumerationImpl: caught an exception while enumerating the drivers!");
+ TOOLS_WARN_EXCEPTION( "cui.options", "ODriverEnumerationImpl::ODriverEnumerationImpl: caught an exception while enumerating the drivers!");
}
}
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 7ad1d22ba2f4..6e0e17b360ef 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -34,6 +34,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <tools/diagnose_ex.h>
#include <apitools.hxx>
#include <sdbcoretools.hxx>
#include <stringconstants.hxx>
@@ -374,7 +375,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
}
catch( const Exception& )
{
- OSL_FAIL( "OContentHelper::setPropertyValues('Title'): caught an exception while renaming!" );
+ TOOLS_WARN_EXCEPTION( "dbaccess", "OContentHelper::setPropertyValues('Title'): caught an exception while renaming!" );
}
}
else
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 2bfee3800b3b..2778a616597e 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -1282,7 +1282,7 @@ bool ODocumentDefinition::save(bool _bApprove, const css::uno::Reference<css::aw
}
catch(const Exception&)
{
- OSL_FAIL("ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
}
return true;
}
@@ -1376,7 +1376,7 @@ void ODocumentDefinition::saveAs()
}
catch(const Exception&)
{
- OSL_FAIL("ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
}
}
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index 60810ad04308..7c2efad43a33 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -263,7 +263,7 @@ namespace
}
catch( const Exception& )
{
- OSL_FAIL( "lcl_urlAllowsInteraction: caught an exception while analyzing the URL!" );
+ TOOLS_WARN_EXCEPTION( "dbaccess", "lcl_urlAllowsInteraction: caught an exception while analyzing the URL!" );
}
return bDoesAllow;
}
@@ -518,7 +518,7 @@ IMPL_LINK_NOARG( DBContentLoader, OnStartTableWizard, void*, void )
}
catch(const Exception&)
{
- OSL_FAIL("caught an exception while starting the table wizard!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "caught an exception while starting the table wizard!");
}
m_xMySelf = nullptr;
}
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 985b6daf0249..ba0a7d911f66 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -1216,7 +1216,7 @@ void ODBExport::GetViewSettings(Sequence<PropertyValue>& aProps)
}
catch(const Exception&)
{
- OSL_FAIL("ODBExport::GetViewSettings: Exception caught!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "ODBExport::GetViewSettings");
}
}
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index 45f0c6ad2d8c..7b2a8cc54e6b 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -29,6 +29,7 @@
#include <comphelper/propertysequence.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace dbaxml
{
@@ -81,7 +82,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport
}
catch(Exception&)
{
- OSL_FAIL("OXMLHierarchyCollection::OXMLHierarchyCollection -> exception caught");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "OXMLHierarchyCollection::OXMLHierarchyCollection");
}
}
diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx
index 6a141eb6aa3f..722e650c3b58 100644
--- a/dbaccess/source/filter/xml/xmlQuery.cxx
+++ b/dbaccess/source/filter/xml/xmlQuery.cxx
@@ -25,6 +25,7 @@
#include <strings.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace dbaxml
{
@@ -111,7 +112,7 @@ void OXMLQuery::setProperties(Reference< XPropertySet > & _xProp )
}
catch(Exception&)
{
- OSL_FAIL("OXMLTable::EndElement -> exception caught");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "OXMLTable::EndElement");
}
}
diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx
index 697f88a7f607..1af5f8e1955a 100644
--- a/dbaccess/source/filter/xml/xmlTable.cxx
+++ b/dbaccess/source/filter/xml/xmlTable.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <comphelper/propertysequence.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
namespace dbaxml
@@ -152,7 +153,7 @@ void OXMLTable::setProperties(uno::Reference< XPropertySet > & _xProp )
}
catch(Exception&)
{
- OSL_FAIL("OXMLTable::EndElement -> exception caught");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "OXMLTable::EndElement -> exception caught");
}
}
@@ -186,7 +187,7 @@ void OXMLTable::endFastElement(sal_Int32 )
}
catch(Exception&)
{
- OSL_FAIL("OXMLQuery::EndElement -> exception caught");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "OXMLQuery::EndElement");
}
}
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index cd4d9c6e8b80..3dd2195f7965 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -161,7 +161,7 @@ OAppDetailPageHelper::~OAppDetailPageHelper()
}
catch(const Exception&)
{
- OSL_FAIL("Exception thrown while disposing preview frame!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "Exception thrown while disposing preview frame!");
}
for (auto& rpBox : m_aLists)
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 41a30c9df178..92e93e5ed8d9 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -770,7 +770,7 @@ void SbaGridControl::SetRowHeight()
}
catch(Exception&)
{
- OSL_FAIL("setPropertyValue: PROPERTY_ROW_HEIGHT throws an exception");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "setPropertyValue: PROPERTY_ROW_HEIGHT throws an exception");
}
}
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 73d3b8134f00..32a62da248e7 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -103,7 +103,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
}
catch(RuntimeException&)
{
- OSL_FAIL("OTableTreeListBox::UpdateTableList : caught a RuntimeException!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "OTableTreeListBox::UpdateTableList");
}
catch ( const SQLException& )
{
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index fccd2e800814..3429f9843c65 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -44,6 +44,7 @@
#include <i18nlangtag/languagetag.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::svt;
using namespace ::dbaui;
@@ -375,7 +376,7 @@ void OSelectionBrowseBox::Init()
}
catch(const SQLException&)
{
- OSL_FAIL("Caught Exception when asking for database metadata options!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "Caught Exception when asking for database metadata options!");
m_nMaxColumns = 0;
}
}
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 5744f58bdb3e..91518656621b 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -31,6 +31,7 @@
#include <vcl/commandevent.hxx>
#include <vcl/event.hxx>
#include <vcl/ptrstyle.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -205,7 +206,7 @@ void OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_FAIL("Exception occurred!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "");
}
try
{
@@ -236,7 +237,7 @@ void OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_FAIL("Exception occurred!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "");
}
}
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 9423d1a8470c..d18f1cfa8037 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <connectivity/dbtools.hxx>
+#include <tools/diagnose_ex.h>
#include <helpids.h>
#include <RelationDesignView.hxx>
#include <JoinController.hxx>
@@ -208,7 +209,7 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
}
catch(const Exception&)
{
- OSL_FAIL("ORelationTableView::AddConnection: Exception occurred!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "ORelationTableView::AddConnection");
}
}
}
@@ -269,7 +270,7 @@ bool ORelationTableView::RemoveConnection(VclPtr<OTableConnection>& rConn, bool
}
catch(Exception&)
{
- OSL_FAIL("ORelationTableView::RemoveConnection: Something other than SQLException occurred!");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "ORelationTableView::RemoveConnection: Something other than SQLException occurred!");
}
return false;
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index ca2d23fff9a6..0d0f609cf013 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -736,7 +736,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleCancelBtn, weld::Button&, void)
}
catch ( const uno::RuntimeException & )
{
- OSL_FAIL( "### unexpected RuntimeException!" );
+ TOOLS_WARN_EXCEPTION( "dbaccess", "" );
}
}
}
@@ -1059,7 +1059,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleCancelBtn, weld::Button&, void)
}
catch ( const uno::RuntimeException & )
{
- OSL_FAIL( "### unexpected RuntimeException!" );
+ TOOLS_WARN_EXCEPTION( "desktop", "" );
}
}
}
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 46561bea798d..92d2afaf0bbb 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -2355,7 +2355,7 @@ namespace accessibility
}
catch (const uno::Exception&)
{
- OSL_FAIL("AccessibleEditableTextPara::setAttributes exception in setPropertyValue");
+ TOOLS_WARN_EXCEPTION( "dbaccess", "AccessibleEditableTextPara::setAttributes exception in setPropertyValue");
}
}
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 7d09c85c096a..709b770bec8c 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -762,7 +762,7 @@ namespace editeng
}
catch( const Exception& )
{
- OSL_FAIL( "HangulHanjaConversion_Impl::implChange: caught unexpected exception!" );
+ TOOLS_WARN_EXCEPTION( "editeng", "HangulHanjaConversion_Impl::implChange: caught unexpected exception!" );
aOffsets.realloc(0);
}
}
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index ea2a3cb3c110..c62527f84398 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -32,6 +32,7 @@
#include <comphelper/mimeconfighelper.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
#include "persistence.hxx"
@@ -286,7 +287,7 @@ void OCommonEmbeddedObject::requestPositioning( const awt::Rectangle& aRect )
}
catch( const uno::Exception& )
{
- OSL_FAIL( "Exception on request to resize!" );
+ TOOLS_WARN_EXCEPTION( "embeddedobj", "Exception on request to resize!" );
}
}
}
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 8ca9eb0327d6..26f17227552e 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -60,6 +60,7 @@
#include <svx/svdmodel.hxx>
#include <svx/svdxcgv.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <memory>
@@ -669,9 +670,9 @@ bool SVGFilter::implExportWriterOrCalc( const Reference< XOutputStream >& rxOStm
}
catch( ... )
{
+ TOOLS_WARN_EXCEPTION( "filter.svg", "" );
delete mpSVGDoc;
mpSVGDoc = nullptr;
- OSL_FAIL( "Exception caught" );
}
delete mpSVGWriter;
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 70f80a6c8c38..42592fa1f76e 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -470,7 +470,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick, void*, void)
#endif
catch( const Exception& )
{
- OSL_FAIL( "OButtonControl::OnClick: caught an exception other than RuntimeException!" );
+ TOOLS_WARN_EXCEPTION( "forms.component", "OButtonControl::OnClick: caught an exception other than RuntimeException!" );
}
}
}
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 475ca63bec01..f9eaab0b31b5 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -373,7 +373,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>&
}
catch( const Exception& )
{
- OSL_FAIL( "OComboBoxModel::read: caught an exception while examining the aggregate's string item list!" );
+ TOOLS_WARN_EXCEPTION( "forms.component", "OComboBoxModel::read: caught an exception while examining the aggregate's string item list!" );
}
// Version
diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx
index 5c682aa6474c..925e23cde6fa 100644
--- a/forms/source/component/Currency.cxx
+++ b/forms/source/component/Currency.cxx
@@ -23,6 +23,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/syslocale.hxx>
#include <comphelper/types.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/form/FormComponentType.hpp>
@@ -99,7 +100,7 @@ void OCurrencyModel::implConstruct()
}
catch(const Exception&)
{
- OSL_FAIL( "OCurrencyModel::implConstruct: caught an exception while initializing the aggregate!" );
+ TOOLS_WARN_EXCEPTION( "forms.component", "OCurrencyModel::implConstruct: caught an exception while initializing the aggregate!" );
}
}
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 3b1f8f6de5f8..41753cc0a121 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -68,10 +68,12 @@
#include <tools/inetmsg.hxx>
#include <tools/inetstrm.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/ucbstreamhelper.hxx>
#include <vcl/svapp.hxx>
#include <vcl/timer.hxx>
#include <osl/mutex.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::dbtools;
using namespace ::comphelper;
@@ -2933,7 +2935,7 @@ void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteraction
}
catch(const SQLException&)
{
- OSL_FAIL("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?");
+ TOOLS_WARN_EXCEPTION( "forms.component", "ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?");
}
if (bSuccess)
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 40241149738d..10b210b7b1bf 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -31,6 +31,7 @@
#include <comphelper/types.hxx>
#include <vcl/unohelp.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::uno;
@@ -155,7 +156,7 @@ void OGridControlModel::cloneColumns( const OGridControlModel* _pOriginalContain
}
catch( const Exception& )
{
- OSL_FAIL( "OGridControlModel::cloneColumns: caught an exception while cloning the columns!" );
+ TOOLS_WARN_EXCEPTION( "forms.component", "OGridControlModel::cloneColumns: caught an exception while cloning the columns!" );
}
}
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 49b779e4cf29..857c25a29ba3 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -823,7 +823,7 @@ bool OImageControlControl::implInsertGraphics()
}
catch(const Exception&)
{
- OSL_FAIL("OImageControlControl::implInsertGraphics: caught an exception while attempting to execute the FilePicker!");
+ TOOLS_WARN_EXCEPTION( "forms.component", "OImageControlControl::implInsertGraphics: caught an exception while attempting to execute the FilePicker!");
}
return false;
}
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index 68861e42cf30..e3d19da934db 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/util/VetoException.hpp>
#include <tools/urlobj.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/graph.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/docfile.hxx>
@@ -425,7 +426,7 @@ namespace frm
catch( const Exception& )
{
css::uno::Any anyEx = cppu::getCaughtException();
- OSL_FAIL( "OClickableImageBaseControl::implSubmit: caught an unknown exception!" );
+ TOOLS_WARN_EXCEPTION( "forms.component", "OClickableImageBaseControl::implSubmit: caught an unknown exception!" );
throw WrappedTargetException( OUString(), *this, anyEx );
}
}
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 0e23b5a7ec63..e698d29f4051 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -60,6 +60,7 @@
#include <osl/mutex.hxx>
#include <sal/log.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
namespace frm
@@ -1053,7 +1054,7 @@ namespace frm
}
catch( const Exception& )
{
- OSL_FAIL( "FormOperations::propertyChange: caught an exception while updating the parser!" );
+ TOOLS_WARN_EXCEPTION( "forms.runtime", "FormOperations::propertyChange: caught an exception while updating the parser!" );
}
impl_invalidateAllSupportedFeatures_nothrow( aGuard );
}
@@ -1561,7 +1562,7 @@ namespace frm
}
catch( const Exception& )
{
- OSL_FAIL( "FormOperations::impl_executeAutoSort_throw: caught an exception while setting the parser properties!" );
+ TOOLS_WARN_EXCEPTION( "forms.runtime", "FormOperations::impl_executeAutoSort_throw: caught an exception while setting the parser properties!" );
}
@@ -1635,7 +1636,7 @@ namespace frm
}
catch( const Exception& )
{
- OSL_FAIL( "FormOperations::impl_executeAutoFilter_throw: caught an exception while setting the parser properties!" );
+ TOOLS_WARN_EXCEPTION( "forms.runtime", "FormOperations::impl_executeAutoFilter_throw: caught an exception while setting the parser properties!" );
}
diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx
index 4939497ec7b9..394c8b817486 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -26,6 +26,7 @@
#include <ucbhelper/content.hxx>
#include <com/sun/star/io/Pipe.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
+#include <tools/diagnose_ex.h>
#include <memory>
@@ -95,7 +96,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const css::uno::Reference<
} catch (const Exception&)
{
// XXX
- OSL_FAIL("Exception during UCB operatration.");
+ TOOLS_WARN_EXCEPTION( "forms.misc", "Exception during UCB operation.");
return UNKNOWN_ERROR;
}
diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx
index ab545e7f6799..b945fdd07b63 100644
--- a/forms/source/xforms/submission/submission_post.cxx
+++ b/forms/source/xforms/submission/submission_post.cxx
@@ -26,6 +26,7 @@
#include <ucbhelper/content.hxx>
#include <ucbhelper/activedatasink.hxx>
#include <com/sun/star/ucb/PostCommandArgument2.hpp>
+#include <tools/diagnose_ex.h>
using namespace css::uno;
using namespace css::ucb;
@@ -68,7 +69,7 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const css::uno::Reference<
}
} catch (const Exception&)
{
- OSL_FAIL("Exception during UCB operatration.");
+ TOOLS_WARN_EXCEPTION( "forms.misc", "Exception during UCB operation.");
return UNKNOWN_ERROR;
}
diff --git a/forms/source/xforms/submission/submission_put.cxx b/forms/source/xforms/submission/submission_put.cxx
index 030eb589caa9..f3f94fafa256 100644
--- a/forms/source/xforms/submission/submission_put.cxx
+++ b/forms/source/xforms/submission/submission_put.cxx
@@ -25,6 +25,7 @@
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
#include <ucbhelper/content.hxx>
+#include <tools/diagnose_ex.h>
using namespace css::uno;
using namespace css::ucb;
@@ -57,7 +58,7 @@ CSubmission::SubmissionResult CSubmissionPut::submit(const css::uno::Reference<
}
catch ( const Exception& )
{
- OSL_FAIL( "Exception during UCB operation." );
+ TOOLS_WARN_EXCEPTION( "forms.misc", "Exception during UCB operation." );
return UNKNOWN_ERROR;
}
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx
index 55614f884f7c..99600415f63c 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -29,6 +29,7 @@
#include <comphelper/processfactory.hxx>
#include <ucbhelper/commandenvironment.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
namespace svt
@@ -148,7 +149,7 @@ namespace svt
}
catch( const Exception& )
{
- OSL_FAIL( "SmartContent::bindTo: unexpected exception caught!" );
+ TOOLS_WARN_EXCEPTION( "fpicker", "SmartContent::bindTo: unexpected exception caught!" );
}
}
else
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index ad2c377e6e6d..fddbead8a452 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -451,7 +451,7 @@ void GrammarCheckingIterator::ProcessResult(
}
catch (lang::IllegalArgumentException &)
{
- OSL_FAIL( "commitMultiTextMarkup: IllegalArgumentException exception caught" );
+ TOOLS_WARN_EXCEPTION( "linguistic", "commitMultiTextMarkup" );
}
}
diff --git a/oox/source/helper/binarystreambase.cxx b/oox/source/helper/binarystreambase.cxx
index 5da64a84eb1f..a75832fa475f 100644
--- a/oox/source/helper/binarystreambase.cxx
+++ b/oox/source/helper/binarystreambase.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/io/XSeekable.hpp>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
namespace oox {
@@ -72,7 +73,7 @@ sal_Int64 BinaryXSeekableStream::size() const
}
catch( Exception& )
{
- OSL_FAIL( "BinaryXSeekableStream::size - exception caught" );
+ TOOLS_WARN_EXCEPTION( "oox", "BinaryXSeekableStream::size" );
}
return -1;
}
@@ -85,7 +86,7 @@ sal_Int64 BinaryXSeekableStream::tell() const
}
catch( Exception& )
{
- OSL_FAIL( "BinaryXSeekableStream::tell - exception caught" );
+ TOOLS_WARN_EXCEPTION( "oox", "BinaryXSeekableStream::tell" );
}
return -1;
}
diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
index b65bd9db8b72..a5c756e62b59 100644
--- a/oox/source/ppt/slidetransition.cxx
+++ b/oox/source/ppt/slidetransition.cxx
@@ -26,6 +26,7 @@
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <tools/color.hxx>
+#include <tools/diagnose_ex.h>
#include <oox/helper/propertymap.hxx>
#include <oox/token/namespaces.hxx>
@@ -90,7 +91,7 @@ namespace oox::ppt {
catch( Exception& )
{
// should not happen
- OSL_FAIL( "exception raised" );
+ TOOLS_WARN_EXCEPTION( "oox", "" );
}
}
@@ -107,7 +108,7 @@ namespace oox::ppt {
catch( Exception& )
{
// should not happen
- OSL_FAIL( "exception raised" );
+ TOOLS_WARN_EXCEPTION( "oox", "" );
}
}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 1c055dcc2905..962d206ed1cb 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -909,12 +909,12 @@ uno::Reference< io::XInputStream > ZipPackageStream::getRawData()
}
catch ( ZipException & )//rException )
{
- OSL_FAIL( "ZipException thrown" );//rException.Message);
+ TOOLS_WARN_EXCEPTION( "package", "" );
return uno::Reference < io::XInputStream > ();
}
catch ( Exception & )
{
- OSL_FAIL( "Exception is thrown during stream wrapping!" );
+ TOOLS_WARN_EXCEPTION( "package", "Exception is thrown during stream wrapping!" );
return uno::Reference < io::XInputStream > ();
}
}
@@ -936,7 +936,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream()
}
catch ( ZipException & )//rException )
{
- OSL_FAIL( "ZipException thrown" );//rException.Message);
+ TOOLS_WARN_EXCEPTION( "package", "" );
return uno::Reference < io::XInputStream > ();
}
catch ( const Exception & )
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index 984bf7d26305..42082bfc3e95 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -21,6 +21,7 @@
#include <strings.hrc>
#include <core_resource.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <tools/diagnose_ex.h>
#include <Tools.hxx>
#include <FormatCondition.hxx>
#include <ReportHelperImpl.hxx>
@@ -171,7 +172,7 @@ OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContex
}
catch(uno::Exception&)
{
- OSL_FAIL("OFixedLine::OFixedLine: Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "OFixedLine::OFixedLine");
}
osl_atomic_decrement( &m_refCount );
}
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 981c42bdf00b..4ae9e44be52b 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1069,7 +1069,7 @@ void SAL_CALL OReportDefinition::close(sal_Bool bDeliverOwnership)
catch (const util::CloseVetoException&) { throw; }
catch (const uno::Exception&)
{
- OSL_FAIL( "ODatabaseDocument::impl_closeControllerFrames: caught an unexpected exception!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "ODatabaseDocument::impl_closeControllerFrames" );
}
}
}
@@ -1374,7 +1374,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
}
catch (const uno::Exception&)
{
- OSL_FAIL("Exception Caught: Could not commit report storage!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Could not commit report storage!");
throw io::IOException();
}
diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx b/reportdesign/source/core/sdr/PropertyForward.cxx
index bf652d01f343..0450e2d342ba 100644
--- a/reportdesign/source/core/sdr/PropertyForward.cxx
+++ b/reportdesign/source/core/sdr/PropertyForward.cxx
@@ -137,7 +137,7 @@ void SAL_CALL OPropertyMediator::propertyChange( const PropertyChangeEvent& evt
}
catch(Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
m_bInChange = false;
}
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 0486c787fc2f..b83f742676c6 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -374,7 +374,7 @@ void OObjectBase::EndListening()
}
catch(const uno::Exception &)
{
- OSL_FAIL("OObjectBase::EndListening: Exception caught!");
+ TOOLS_WARN_EXCEPTION( "package", "OObjectBase::EndListening");
}
}
m_xPropertyChangeListener.clear();
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx
index a118970e106b..1ce789210df1 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/table/BorderLine2.hpp>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <strings.hxx>
#include "xmlTable.hxx"
#include "xmlFormattedField.hxx"
@@ -232,7 +233,7 @@ void OXMLCell::endFastElement(sal_Int32)
}
catch(uno::Exception&)
{
- OSL_FAIL("OXMLCell::EndElement -> exception caught");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "OXMLCell::EndElement -> exception caught");
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlComponent.cxx b/reportdesign/source/filter/xml/xmlComponent.cxx
index c6433d2a87ed..ab55e9215bf3 100644
--- a/reportdesign/source/filter/xml/xmlComponent.cxx
+++ b/reportdesign/source/filter/xml/xmlComponent.cxx
@@ -22,6 +22,7 @@
#include <xmloff/xmlnamespace.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace rptxml
{
@@ -56,7 +57,7 @@ OXMLComponent::OXMLComponent( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_FAIL("Exception caught while putting props into report component!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while putting props into report component!");
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
index 5ffd0284e520..35167e338095 100644
--- a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
+++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
@@ -23,6 +23,7 @@
#include <strings.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace rptxml
{
@@ -58,7 +59,7 @@ OXMLCondPrtExpr::OXMLCondPrtExpr( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_FAIL("Exception caught while putting Function props!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while putting Function props!");
}
}
diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.cxx b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
index ca381b22760b..235f6931778f 100644
--- a/reportdesign/source/filter/xml/xmlFormatCondition.cxx
+++ b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
@@ -23,6 +23,7 @@
#include "xmlHelper.hxx"
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace rptxml
{
@@ -67,7 +68,7 @@ OXMLFormatCondition::OXMLFormatCondition( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_FAIL("Exception caught while filling the report definition props");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while filling the report definition props");
}
}
diff --git a/reportdesign/source/filter/xml/xmlFormattedField.cxx b/reportdesign/source/filter/xml/xmlFormattedField.cxx
index 4c419844e756..c34f8adf2414 100644
--- a/reportdesign/source/filter/xml/xmlFormattedField.cxx
+++ b/reportdesign/source/filter/xml/xmlFormattedField.cxx
@@ -22,6 +22,7 @@
#include <xmloff/xmlnamespace.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace rptxml
@@ -64,7 +65,7 @@ OXMLFormattedField::OXMLFormattedField( ORptFilter& rImport
}
catch(Exception&)
{
- OSL_FAIL("Exception caught while filling the report definition props");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while filling the report definition props");
}
}
diff --git a/reportdesign/source/filter/xml/xmlFunction.cxx b/reportdesign/source/filter/xml/xmlFunction.cxx
index 1c26aa4dd27c..62dcaa9256f7 100644
--- a/reportdesign/source/filter/xml/xmlFunction.cxx
+++ b/reportdesign/source/filter/xml/xmlFunction.cxx
@@ -22,6 +22,7 @@
#include <xmloff/xmlnamespace.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace rptxml
{
@@ -76,7 +77,7 @@ OXMLFunction::OXMLFunction( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_FAIL("Exception caught while putting Function props!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while putting Function props!");
}
}
}
@@ -106,7 +107,7 @@ void OXMLFunction::endFastElement(sal_Int32 )
m_xFunction.clear();
}catch(uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx
index be7fc44e4d5d..94f6028494ce 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/report/KeepTogether.hpp>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace rptxml
{
@@ -164,7 +165,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_FAIL("Exception caught while putting group props!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while putting group props!");
}
}
}
@@ -236,7 +237,7 @@ void OXMLGroup::endFastElement(sal_Int32 )
m_xGroups->insertByIndex(0,uno::makeAny(m_xGroup));
}catch(uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
}
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 68ba54601959..e26f30be6492 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <xmloff/EnumPropertyHdl.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#define XML_RPT_ALIGNMENT (XML_DB_TYPES_START+1)
namespace rptxml
@@ -309,7 +310,7 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const OUString& _sStyleName,
}
catch(uno::Exception&)
{
- OSL_FAIL("OXMLHelper::copyStyleElements -> exception caught");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "OXMLHelper::copyStyleElements");
}
}
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx
index fe4d9395232f..9f27b6151e82 100644
--- a/reportdesign/source/filter/xml/xmlImage.cxx
+++ b/reportdesign/source/filter/xml/xmlImage.cxx
@@ -25,6 +25,7 @@
#include <unotools/pathoptions.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/awt/ImageScaleMode.hpp>
@@ -90,7 +91,7 @@ OXMLImage::OXMLImage( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_FAIL("Exception caught while filling the image props");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while filling the image props");
}
}
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 4012f2632dc7..81ff22b0b26a 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -35,6 +35,7 @@
#include <xmloff/xmluconv.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/xmlnamespace.hxx>
+#include <tools/diagnose_ex.h>
#include "xmlHelper.hxx"
#include "xmlEnums.hxx"
@@ -229,7 +230,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught while filling the report definition props");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while filling the report definition props");
}
bExport = false;
}
diff --git a/reportdesign/source/filter/xml/xmlReport.cxx b/reportdesign/source/filter/xml/xmlReport.cxx
index a60b42133f69..a559946fc848 100644
--- a/reportdesign/source/filter/xml/xmlReport.cxx
+++ b/reportdesign/source/filter/xml/xmlReport.cxx
@@ -94,7 +94,7 @@ OXMLReport::OXMLReport( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_FAIL("Exception caught while filling the report definition props");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while filling the report definition props");
}
}
diff --git a/reportdesign/source/filter/xml/xmlReportElement.cxx b/reportdesign/source/filter/xml/xmlReportElement.cxx
index 14e3958d3c94..0c49c9fb47e3 100644
--- a/reportdesign/source/filter/xml/xmlReportElement.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElement.cxx
@@ -27,6 +27,7 @@
#include "xmlFormatCondition.hxx"
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace rptxml
{
@@ -67,7 +68,7 @@ OXMLReportElement::OXMLReportElement( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_FAIL("Exception caught while filling the report definition props");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while filling the report definition props");
}
}
diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.cxx b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
index 532cac436429..590af5a2f687 100644
--- a/reportdesign/source/filter/xml/xmlReportElementBase.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
@@ -25,6 +25,7 @@
#include "xmlEnums.hxx"
#include "xmlTable.hxx"
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
namespace rptxml
{
@@ -86,7 +87,7 @@ void OXMLReportElementBase::endFastElement(sal_Int32 )
}
catch(Exception&)
{
- OSL_FAIL("Exception caught while inserting a new control!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while inserting a new control!");
}
}
diff --git a/reportdesign/source/filter/xml/xmlSection.cxx b/reportdesign/source/filter/xml/xmlSection.cxx
index 5e1c47e1869c..6e1954ab0456 100644
--- a/reportdesign/source/filter/xml/xmlSection.cxx
+++ b/reportdesign/source/filter/xml/xmlSection.cxx
@@ -26,6 +26,7 @@
#include "xmlTable.hxx"
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
namespace rptxml
@@ -79,7 +80,7 @@ OXMLSection::OXMLSection( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_FAIL("Exception caught while filling the section props");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while filling the section props");
}
}
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx b/reportdesign/source/filter/xml/xmlTable.cxx
index 55c44df062c2..2c3bc48cbdda 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/report/XFixedLine.hpp>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <numeric>
@@ -106,7 +107,7 @@ OXMLTable::OXMLTable( ORptFilter& rImport
}
catch(Exception&)
{
- OSL_FAIL("Exception caught while filling the section props");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while filling the section props");
}
}
@@ -251,7 +252,7 @@ void OXMLTable::endFastElement(sal_Int32 )
}
catch(Exception&)
{
- OSL_FAIL("OXMLTable::EndElement -> exception caught");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "OXMLTable::EndElement");
}
}
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 2aca2085fad5..42ed619445e2 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -38,6 +38,7 @@
#include <cppuhelper/implbase.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
#include <algorithm>
@@ -476,7 +477,7 @@ bool OFieldExpressionControl::SaveModified()
}
catch(uno::Exception&)
{
- OSL_FAIL("OFieldExpressionControl::SaveModified: Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "OFieldExpressionControl::SaveModified");
}
}
@@ -501,7 +502,7 @@ OUString OFieldExpressionControl::GetCellText( sal_Int32 nRow, sal_uInt16 /*nCol
}
catch (const uno::Exception&)
{
- OSL_FAIL("Exception caught while getting expression value from the group");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while getting expression value from the group");
}
}
return sText;
@@ -573,7 +574,7 @@ EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(sal_Int32 nRow) c
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught while try to get a group!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while try to get a group!");
}
}
return EditBrowseBox::CLEAN;
@@ -921,7 +922,7 @@ sal_Int32 OGroupsSortingDialog::getColumnDataType(const OUString& _sColumnName)
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught while getting the type of a column");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while getting the type of a column");
}
return nDataType;
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index 92c53478df73..9f22c4e5ae35 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <metadata.hxx>
#include <osl/mutex.hxx>
+#include <tools/diagnose_ex.h>
#include <core_resource.hxx>
#include <helpids.h>
#include <strings.hrc>
@@ -287,7 +288,7 @@ uno::Any SAL_CALL DataProviderHandler::convertToPropertyValue(const OUString & _
}
catch( const uno::Exception& )
{
- OSL_FAIL( "DataProviderHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "DataProviderHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
}
break;
case PROPERTY_ID_MASTERFIELDS:
@@ -321,7 +322,7 @@ uno::Any SAL_CALL DataProviderHandler::convertToControlValue(const OUString & _r
}
catch( const uno::Exception& )
{
- OSL_FAIL( "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
}
break;
default:
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 079812ccb1c9..b5b78e02f74e 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -987,7 +987,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const OUString & Prope
}
catch( const uno::Exception& )
{
- OSL_FAIL( "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
}
}
}
@@ -1160,7 +1160,7 @@ uno::Any SAL_CALL GeometryHandler::convertToControlValue(const OUString & Proper
}
catch( const uno::Exception& )
{
- OSL_FAIL( "GeometryHandler::convertToControlValue: caught an exception while converting via TypeConverter!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "GeometryHandler::convertToControlValue: caught an exception while converting via TypeConverter!" );
}
}
break;
@@ -1687,7 +1687,7 @@ void GeometryHandler::impl_fillMimeTypes_nothrow(::std::vector< OUString >& _out
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
}
@@ -1718,7 +1718,7 @@ void GeometryHandler::impl_fillScopeList_nothrow(::std::vector< OUString >& _out
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
}
@@ -1832,7 +1832,7 @@ bool GeometryHandler::isDefaultFunction( const OUString& _sQuotedFunction
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
return bDefaultFunction;
}
@@ -1871,7 +1871,7 @@ bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference< repo
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
return bDefaultFunction;
}
@@ -1956,7 +1956,7 @@ void GeometryHandler::createDefaultFunction(::osl::ResettableMutexGuard& _aGuard
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
}
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index c9cfbbd4ba72..d5265a514bfb 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -21,6 +21,7 @@
#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <formula/funcvarargs.h>
@@ -167,7 +168,7 @@ OUString FunctionDescription::getFormula(const ::std::vector< OUString >& _aArgu
}
catch(const uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
return sFormula;
}
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index bb319b668377..be280a8368f2 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -85,7 +85,7 @@ namespace
}
catch(const uno::Exception&)
{
- OSL_FAIL("lcl_insertElements:Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "lcl_insertElements");
}
}
}
@@ -103,7 +103,7 @@ namespace
}
catch(const uno::Exception&)
{
- OSL_FAIL("lcl_setValues:Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "lcl_setValues");
}
}
}
@@ -143,7 +143,7 @@ OSectionUndo::~OSectionUndo()
}
catch(const uno::Exception &)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
}
}
@@ -334,7 +334,7 @@ void OGroupUndo::implReInsert( )
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught while undoing remove group");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while undoing remove group");
}
}
@@ -346,7 +346,7 @@ void OGroupUndo::implReRemove( )
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught while redoing remove group");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while redoing remove group");
}
}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 7613e7bcd09c..4e97d9cdde04 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -309,7 +309,7 @@ void OReportController::disposing()
}
catch(const uno::Exception&)
{
- OSL_FAIL("Exception caught while disposing row sets.");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while disposing row sets.");
}
m_xRowSet.clear();
m_xRowSetMediator.clear();
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 9eb402e841e3..ace815efbf9b 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -91,7 +91,7 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "");
}
m_pFunc.reset(new DlgEdFuncSelect( this ));
@@ -274,7 +274,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
}
catch(uno::Exception&)
{
- OSL_FAIL("Exception caught while pasting a new object!");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "Exception caught while pasting a new object!");
}
if ( !_bForce )
break;
@@ -541,7 +541,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
}
catch(const uno::Exception &)
{
- OSL_FAIL("Exception caught: OReportSection::impl_adjustObjectSizePosition()");
+ TOOLS_WARN_EXCEPTION( "reportdesign", "OReportSection::impl_adjustObjectSizePosition()");
}
}
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index fe4c7df47f0b..84656ded767f 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -235,7 +235,7 @@ OUString PropBrw::getCurrentPage() const
}
catch( const Exception& )
{
- OSL_FAIL( "PropBrw::getCurrentPage: caught an exception while retrieving the current page!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "PropBrw::getCurrentPage: caught an exception while retrieving the current page!" );
}
return sCurrentPage;
}
@@ -255,7 +255,7 @@ bool PropBrw::Close()
}
catch( const Exception& )
{
- OSL_FAIL( "FmPropBrw::Close: caught an exception while asking the controller!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "FmPropBrw::Close: caught an exception while asking the controller!" );
}
}
implDetachController();
@@ -310,7 +310,7 @@ void PropBrw::implSetNewObject( const uno::Sequence< Reference<uno::XInterface>
}
catch( const Exception& )
{
- OSL_FAIL( "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
}
}
SetText( GetHeadlineName(_aObjects) );
@@ -446,7 +446,7 @@ void PropBrw::Update( OSectionView* pNewView )
}
catch( const Exception& )
{
- OSL_FAIL( "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
}
}
}
@@ -489,7 +489,7 @@ void PropBrw::Update( OSectionView* pNewView )
}
catch ( Exception& )
{
- OSL_FAIL( "PropBrw::Update: Exception occurred!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "PropBrw::Update" );
}
}
@@ -512,7 +512,7 @@ void PropBrw::Update( const uno::Reference< uno::XInterface>& _xReportComponent)
}
catch ( Exception& )
{
- OSL_FAIL( "PropBrw::Update: Exception occurred!" );
+ TOOLS_WARN_EXCEPTION( "reportdesign", "PropBrw::Update: Exception occurred!" );
}
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index ba1a8f4d398e..f9951cb8da04 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -772,7 +772,7 @@ void ScDPObject::CreateObjects()
}
catch(uno::Exception&)
{
- OSL_FAIL("exception in refresh");
+ TOOLS_WARN_EXCEPTION( "sc", "exception in refresh");
}
}
@@ -3266,7 +3266,7 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
}
catch ( uno::Exception& )
{
- OSL_FAIL("Unexpected exception in database");
+ TOOLS_WARN_EXCEPTION( "sc", "Unexpected exception in database");
}
xRowSet.set(nullptr);
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx
index 04f587d4df5e..554d59d7adab 100644
--- a/sc/source/core/data/globalx.cxx
+++ b/sc/source/core/data/globalx.cxx
@@ -22,6 +22,7 @@
#include <osl/diagnose.h>
#include <osl/file.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <ucbhelper/content.hxx>
#include <unotools/pathoptions.hxx>
@@ -100,13 +101,13 @@ void ScGlobal::InitAddIns()
}
catch ( Exception& )
{
- OSL_FAIL( "ResultSetException caught!" );
+ TOOLS_WARN_EXCEPTION( "sc", "" );
}
}
}
catch ( Exception& )
{
- OSL_FAIL( "Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sc", "" );
}
catch ( ... )
{
@@ -133,7 +134,7 @@ OUString ScGlobal::GetOrdinalSuffix( sal_Int32 nNumber)
}
catch ( Exception& )
{
- OSL_FAIL( "GetOrdinalSuffix: exception caught during init" );
+ TOOLS_WARN_EXCEPTION( "sc", "GetOrdinalSuffix: exception caught during init" );
}
return OUString();
}
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 54ace0282c44..aeb3c53bdc80 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -28,6 +28,7 @@
#include <svx/svdoole2.hxx>
#include <svx/svdpage.hxx>
#include <svtools/embedhlp.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
@@ -271,7 +272,7 @@ void ScChartHelper::SetChartRanges( const uno::Reference< chart2::XChartDocument
}
catch (const uno::Exception&)
{
- OSL_FAIL("Exception in ScChartHelper::SetChartRanges - invalid range string?");
+ TOOLS_WARN_EXCEPTION( "sc", "Exception in ScChartHelper::SetChartRanges - invalid range string?");
}
xChartDoc->unlockControllers();
diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx
index 2ac1a3759ad7..9b0338b95628 100644
--- a/sc/source/core/tool/chartlock.cxx
+++ b/sc/source/core/tool/chartlock.cxx
@@ -20,6 +20,7 @@
#include <svx/svditer.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdpage.hxx>
+#include <tools/diagnose_ex.h>
#include <chartlock.hxx>
#include <document.hxx>
@@ -92,7 +93,7 @@ ScChartLockGuard::ScChartLockGuard( ScDocument* pDoc ) :
}
catch ( uno::Exception& )
{
- OSL_FAIL("Unexpected exception in ScChartLockGuard");
+ TOOLS_WARN_EXCEPTION( "sc", "Unexpected exception in ScChartLockGuard");
}
}
}
@@ -109,7 +110,7 @@ ScChartLockGuard::~ScChartLockGuard()
}
catch ( uno::Exception& )
{
- OSL_FAIL("Unexpected exception in ScChartLockGuard");
+ TOOLS_WARN_EXCEPTION( "sc", "Unexpected exception in ScChartLockGuard");
}
}
}
@@ -133,7 +134,7 @@ void ScChartLockGuard::AlsoLockThisChart( const Reference< frame::XModel >& xMod
}
catch ( uno::Exception& )
{
- OSL_FAIL("Unexpected exception in ScChartLockGuard");
+ TOOLS_WARN_EXCEPTION( "sc", "Unexpected exception in ScChartLockGuard");
}
}
}
diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx
index 6469f8da70be..46d8075197db 100644
--- a/sc/source/filter/oox/pivottablebuffer.cxx
+++ b/sc/source/filter/oox/pivottablebuffer.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/sheet/XSheetOperation.hpp>
#include <com/sun/star/xml/sax/XFastAttributeList.hpp>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
#include <oox/helper/binaryinputstream.hxx>
#include <oox/helper/attributelist.hxx>
@@ -1313,7 +1314,7 @@ void PivotTable::finalizeImport()
}
catch( Exception& )
{
- OSL_FAIL( "PivotTable::finalizeImport - exception while creating the DataPilot table" );
+ TOOLS_WARN_EXCEPTION( "sc", "PivotTable::finalizeImport - exception while creating the DataPilot table" );
}
}
diff --git a/sc/source/ui/dataprovider/sqldataprovider.cxx b/sc/source/ui/dataprovider/sqldataprovider.cxx
index 05472865fbb7..313f64a76c5d 100644
--- a/sc/source/ui/dataprovider/sqldataprovider.cxx
+++ b/sc/source/ui/dataprovider/sqldataprovider.cxx
@@ -21,6 +21,7 @@
#include <vcl/svapp.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
using namespace css;
using namespace ::com::sun::star::beans;
@@ -109,7 +110,7 @@ void SQLFetchThread::execute()
}
catch (uno::Exception&)
{
- OSL_FAIL("exception in database");
+ TOOLS_WARN_EXCEPTION("sc", "exception in database");
}
for (auto& itr : maDataTransformations)
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 8e97a1d93465..43b8f296e072 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -21,6 +21,7 @@
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/sheet/DataImportMode.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
@@ -61,7 +62,7 @@ ScDataPilotDatabaseDlg::ScDataPilotDatabaseDlg(weld::Window* pParent)
}
catch(uno::Exception&)
{
- OSL_FAIL("exception in database");
+ TOOLS_WARN_EXCEPTION( "sc", "exception in database");
}
m_xLbDatabase->set_active(0);
@@ -162,7 +163,7 @@ void ScDataPilotDatabaseDlg::FillObjects()
catch(uno::Exception&)
{
// this may happen if an invalid database is selected -> no DBG_ERROR
- OSL_FAIL("exception in database");
+ TOOLS_WARN_EXCEPTION( "sc", "exception in database");
}
}
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index edc242b8ccc5..2baf0d901ee3 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -26,6 +26,7 @@
#include <sfx2/viewfrm.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdb/XCompletedExecution.hpp>
@@ -366,7 +367,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
catch ( uno::Exception& )
{
- OSL_FAIL("Unexpected exception in database");
+ TOOLS_WARN_EXCEPTION( "sc", "Unexpected exception in database");
}
// test for cell protection
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 0d7345e29fcc..1e74a5c01a9e 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -65,6 +65,7 @@
#include <com/sun/star/util/VetoException.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <ooo/vba/excel/XWorkbook.hpp>
+#include <tools/diagnose_ex.h>
#include <config_folders.h>
@@ -956,7 +957,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
catch ( uno::Exception& )
{
- OSL_FAIL( "SfxEventHintId::SaveDoc: caught exception" );
+ TOOLS_WARN_EXCEPTION( "sc", "SfxEventHintId::SaveDoc" );
SC_MOD()->SetInSharedDocSaving( false );
try
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 7c1c3d430686..9800f873b8ae 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -56,6 +56,7 @@ using namespace ::com::sun::star;
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <sal/log.hxx>
#include <unotools/charclass.hxx>
+#include <tools/diagnose_ex.h>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
@@ -1121,7 +1122,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
catch ( uno::Exception& )
{
- OSL_FAIL( "SID_SHARE_DOC: caught exception" );
+ TOOLS_WARN_EXCEPTION( "sc", "SID_SHARE_DOC" );
SC_MOD()->SetInSharedDocSaving( false );
try
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index f6f0fe459c7b..09dd62e67045 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -213,7 +213,7 @@ bool ScDocShell::IsDocument( const INetURLObject& rURL )
catch( uno::Exception& )
{
// ucb may throw different exceptions on failure now - warning only
- OSL_FAIL( "Any other exception" );
+ TOOLS_WARN_EXCEPTION( "sc", "Any other exception" );
}
return bRet;
@@ -427,7 +427,7 @@ ErrCode ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncoding
}
catch ( uno::Exception& )
{
- OSL_FAIL("Unexpected exception in database");
+ TOOLS_WARN_EXCEPTION( "sc", "Unexpected exception in database");
nErr = ERRCODE_IO_GENERAL;
}
@@ -1071,7 +1071,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding
}
catch ( uno::Exception& )
{
- OSL_FAIL("Unexpected exception in database");
+ TOOLS_WARN_EXCEPTION( "sc", "Unexpected exception in database");
nErr = ERRCODE_IO_GENERAL;
}
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 432bc6234488..9f1a6e16185b 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -22,6 +22,7 @@
#include <sfx2/dialoghelper.hxx>
#include <svl/sharecontrolfile.hxx>
#include <unotools/useroptions.hxx>
+#include <tools/diagnose_ex.h>
#include <docsh.hxx>
@@ -159,7 +160,7 @@ void ScShareDocumentDlg::UpdateView()
}
catch ( uno::Exception& )
{
- OSL_FAIL( "ScShareDocumentDlg::UpdateView(): caught exception" );
+ TOOLS_WARN_EXCEPTION( "sc", "ScShareDocumentDlg::UpdateView()" );
m_xLbUsers->clear();
m_xLbUsers->append_text(m_aStrNoUserData);
}
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index e8591c1732b2..39e17f79ca55 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <cppuhelper/supportsservice.hxx>
+#include <tools/diagnose_ex.h>
namespace calc
{
@@ -327,7 +328,7 @@ namespace calc
}
catch( const Exception& )
{
- OSL_FAIL( "OCellListSource::notifyModified: caught a (non-runtime) exception!" );
+ TOOLS_WARN_EXCEPTION( "sc", "OCellListSource::notifyModified: caught a (non-runtime) exception!" );
}
}
@@ -399,7 +400,7 @@ namespace calc
}
catch( const Exception& )
{
- OSL_FAIL( "OCellListSource::initialize: caught an exception while retrieving the cell object!" );
+ TOOLS_WARN_EXCEPTION( "sc", "OCellListSource::initialize: caught an exception while retrieving the cell object!" );
}
if ( !m_xRange.is() )
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 8c00ecc12402..91f9666f1f6c 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -43,6 +43,7 @@
#include <svl/zformat.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <float.h>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/awt/XBitmap.hpp>
#include <com/sun/star/util/CellProtection.hpp>
@@ -2599,7 +2600,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< OUString
}
catch ( lang::IllegalArgumentException& )
{
- OSL_FAIL("exception when setting cell style"); // not supposed to happen
+ TOOLS_WARN_EXCEPTION( "sc", "exception when setting cell style"); // not supposed to happen
}
}
}
@@ -2734,7 +2735,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
}
catch ( lang::IllegalArgumentException& )
{
- OSL_FAIL("exception when setting cell style"); // not supposed to happen
+ TOOLS_WARN_EXCEPTION( "sc", "exception when setting cell style"); // not supposed to happen
}
}
}
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index 242ba364137c..ba72cf8e6c51 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/util/NumberFormat.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/types.hxx>
+#include <tools/diagnose_ex.h>
namespace calc
{
@@ -465,7 +466,7 @@ namespace calc
}
catch( const Exception& )
{
- OSL_FAIL( "OCellValueBinding::notifyModified: caught a (non-runtime) exception!" );
+ TOOLS_WARN_EXCEPTION( "sc", "OCellValueBinding::notifyModified: caught a (non-runtime) exception!" );
}
}
}
@@ -540,7 +541,7 @@ namespace calc
}
catch( const Exception& )
{
- OSL_FAIL( "OCellValueBinding::initialize: caught an exception while retrieving the cell object!" );
+ TOOLS_WARN_EXCEPTION( "sc", "OCellValueBinding::initialize: caught an exception while retrieving the cell object!" );
}
if ( !m_xCell.is() )
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 63ab40f753a7..fa5bb8359334 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -31,6 +31,7 @@
#include <toolkit/helper/convert.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/lang/NoSupportException.hpp>
@@ -1077,7 +1078,7 @@ static void lcl_CopyOneProperty( beans::XPropertySet& rDest, beans::XPropertySet
}
catch (uno::Exception&)
{
- OSL_FAIL("Exception in text field");
+ TOOLS_WARN_EXCEPTION( "sc", "Exception in text field");
}
}
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index cfeedaf81bfc..d0006564d53e 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -47,6 +47,7 @@
#include <svl/whiter.hxx>
#include <unotools/moduleoptions.hxx>
#include <sot/exchange.hxx>
+#include <tools/diagnose_ex.h>
#include <tabvwsh.hxx>
#include <scmod.hxx>
@@ -240,7 +241,7 @@ void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, tools::Long nVerb )
}
catch( const uno::Exception & )
{
- OSL_FAIL( "Exception caught while querying chart" );
+ TOOLS_WARN_EXCEPTION( "sc", "Exception caught while querying chart" );
}
}
}
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index 26fc13331ec5..d540b4d09749 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -355,7 +355,7 @@ public:
}
catch( uno::Exception& )
{
- OSL_FAIL( "DefaultBrowseNode::DefaultBrowseNode: Caught exception!" );
+ TOOLS_WARN_EXCEPTION( "scripting", "DefaultBrowseNode::DefaultBrowseNode" );
}
OSL_ENSURE( m_xAggProxy.is(),
"DefaultBrowseNode::DefaultBrowseNode: Wrapped BrowseNode cannot be aggregated!" );
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index bf4c3dab60db..bbff1b9f6fdc 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -18,6 +18,7 @@
*/
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
#include <com/sun/star/animations/AnimationNodeType.hpp>
#include <com/sun/star/animations/AnimateColor.hpp>
@@ -360,7 +361,7 @@ sal_Int32 CustomAnimationEffect::getNumberOfSubitems( const Any& aTarget, sal_In
catch( Exception& )
{
nSubItems = 0;
- OSL_FAIL( "sd::CustomAnimationEffect::getNumberOfSubitems(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::getNumberOfSubitems(), exception caught!" );
}
return nSubItems;
@@ -685,7 +686,7 @@ void CustomAnimationEffect::setTarget( const css::uno::Any& rTarget )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setTarget(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setTarget()" );
}
}
@@ -720,7 +721,7 @@ void CustomAnimationEffect::setTargetSubItem( sal_Int16 nSubItem )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setTargetSubItem(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setTargetSubItem()" );
}
}
@@ -772,7 +773,7 @@ void CustomAnimationEffect::setDuration( double fDuration )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setDuration(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setDuration()" );
}
}
@@ -785,7 +786,7 @@ void CustomAnimationEffect::setBegin( double fBegin )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setBegin(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setBegin()" );
}
}
@@ -798,7 +799,7 @@ void CustomAnimationEffect::setAcceleration( double fAcceleration )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setAcceleration(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setAcceleration()" );
}
}
@@ -811,7 +812,7 @@ void CustomAnimationEffect::setDecelerate( double fDecelerate )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setDecelerate(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setDecelerate()" );
}
}
@@ -824,7 +825,7 @@ void CustomAnimationEffect::setAutoReverse( bool bAutoReverse )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setAutoReverse(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setAutoReverse()" );
}
}
@@ -1072,7 +1073,7 @@ void CustomAnimationEffect::setIterateType( sal_Int16 nIterateType )
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationEffect::setIterateType(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setIterateType()" );
}
}
@@ -1113,7 +1114,7 @@ OUString CustomAnimationEffect::getPath() const
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::getPath(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::getPath()" );
}
return aPath;
@@ -1142,7 +1143,7 @@ void CustomAnimationEffect::setPath( const OUString& rPath )
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setPath(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setPath()" );
}
}
@@ -1180,7 +1181,7 @@ Any CustomAnimationEffect::getProperty( sal_Int32 nNodeType, std::u16string_view
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::getProperty(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::getProperty()" );
}
return aProperty;
@@ -1232,7 +1233,7 @@ bool CustomAnimationEffect::setProperty( sal_Int32 nNodeType, std::u16string_vie
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setProperty(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setProperty()" );
}
return bChanged;
@@ -1285,7 +1286,7 @@ Any CustomAnimationEffect::getColor( sal_Int32 nIndex )
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::getColor(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::getColor()" );
}
return aColor;
@@ -1342,7 +1343,7 @@ void CustomAnimationEffect::setColor( sal_Int32 nIndex, const Any& rColor )
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setColor(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setColor()" );
}
}
@@ -1377,7 +1378,7 @@ Any CustomAnimationEffect::getTransformationProperty( sal_Int32 nTransformType,
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::getTransformationProperty(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::getTransformationProperty()" );
}
return aProperty;
@@ -1426,7 +1427,7 @@ bool CustomAnimationEffect::setTransformationProperty( sal_Int32 nTransformType,
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setTransformationProperty(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setTransformationProperty()" );
}
return bChanged;
@@ -1449,7 +1450,7 @@ void CustomAnimationEffect::createAudio( const css::uno::Any& rSource )
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::createAudio(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::createAudio()" );
}
}
@@ -1470,7 +1471,7 @@ static Reference< XCommand > findCommandNode( const Reference< XAnimationNode >&
}
catch( Exception& )
{
- OSL_FAIL("sd::findCommandNode(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::findCommandNode()" );
}
return xCommand;
@@ -1502,7 +1503,7 @@ void CustomAnimationEffect::removeAudio()
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::removeAudio(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::removeAudio()" );
}
}
@@ -1522,7 +1523,7 @@ void CustomAnimationEffect::setAudio( const Reference< css::animations::XAudio >
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setAudio(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setAudio()" );
}
}
@@ -1548,7 +1549,7 @@ void CustomAnimationEffect::setStopAudio()
}
catch( Exception& )
{
- OSL_FAIL("sd::CustomAnimationEffect::setStopAudio(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationEffect::setStopAudio()" );
}
}
@@ -1762,7 +1763,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::append( const SdrPathObj& rPathOb
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::append(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::EffectSequenceHelper::append()" );
}
return pEffect;
@@ -1787,7 +1788,7 @@ void EffectSequenceHelper::replace( const CustomAnimationEffectPtr& pEffect, con
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::replace(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::EffectSequenceHelper::replace()" );
}
}
@@ -1946,7 +1947,7 @@ void EffectSequenceHelper::implRebuild()
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::rebuild(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::EffectSequenceHelper::rebuild()" );
}
}
@@ -2083,7 +2084,7 @@ void stl_process_after_effect_node_func(AfterEffectNode const & rNode)
}
catch( Exception& )
{
- OSL_FAIL( "ppt::stl_process_after_effect_node_func::operator(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "ppt::stl_process_after_effect_node_func::operator()" );
}
}
@@ -2585,7 +2586,7 @@ void EffectSequenceHelper::createTextGroupParagraphEffects( const CustomAnimatio
}
catch( Exception& )
{
- OSL_FAIL("sd::EffectSequenceHelper::createTextGroup(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::EffectSequenceHelper::createTextGroup()" );
}
}
@@ -2889,7 +2890,7 @@ void EffectSequenceHelper::create( const css::uno::Reference< css::animations::X
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::create(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::EffectSequenceHelper::create()" );
}
}
@@ -2913,7 +2914,7 @@ void EffectSequenceHelper::createEffectsequence( const Reference< XAnimationNode
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::createEffectsequence(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::EffectSequenceHelper::createEffectsequence()" );
}
}
@@ -2960,7 +2961,7 @@ void EffectSequenceHelper::createEffects( const Reference< XAnimationNode >& xNo
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::createEffects(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::EffectSequenceHelper::createEffects()" );
}
}
@@ -3010,7 +3011,7 @@ void EffectSequenceHelper::processAfterEffect( const Reference< XAnimationNode >
}
catch( Exception& )
{
- OSL_FAIL( "sd::EffectSequenceHelper::processAfterEffect(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::EffectSequenceHelper::processAfterEffect()" );
}
}
@@ -3159,7 +3160,7 @@ void MainSequence::createMainSequence()
}
catch( Exception& )
{
- OSL_FAIL( "sd::MainSequence::create(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::MainSequence::create()" );
return;
}
@@ -3514,7 +3515,7 @@ InteractiveSequence::InteractiveSequence( const Reference< XTimeContainer >& xSe
}
catch( Exception& )
{
- OSL_FAIL( "sd::InteractiveSequence::InteractiveSequence(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::InteractiveSequence::InteractiveSequence()" );
return;
}
}
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index d65d8aebce65..1082f9d8500b 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -79,7 +79,7 @@ static Reference< XNameAccess > getNodeAccess( const Reference< XMultiServiceFac
}
catch (const Exception&)
{
- OSL_FAIL( "sd::getNodeAccess(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::getNodeAccess()" );
}
return xConfigAccess;
@@ -109,13 +109,9 @@ void implImportLabels( const Reference< XMultiServiceFactory >& xConfigProvider,
}
}
}
- catch (const lang::WrappedTargetException&)
- {
- OSL_FAIL( "sd::implImportLabels(), WrappedTargetException caught!" );
- }
catch (const Exception&)
{
- OSL_FAIL( "sd::implImportLabels(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::implImportLabels()" );
}
}
@@ -171,7 +167,7 @@ Reference< XAnimationNode > CustomAnimationPreset::create( const OUString& rstrS
}
catch (const Exception&)
{
- OSL_FAIL( "sd::CustomAnimationPresets::create(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPresets::create()" );
}
Reference< XAnimationNode > xNode;
@@ -306,21 +302,9 @@ void CustomAnimationPresets::importEffects()
}
}
}
- catch (const xml::sax::SAXParseException&)
- {
- OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), SAXParseException caught!" );
- }
- catch (const xml::sax::SAXException&)
- {
- OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), SAXException caught!" );
- }
- catch (const io::IOException&)
- {
- OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), IOException caught!" );
- }
catch (const Exception&)
{
- OSL_FAIL( "sd::CustomAnimationPresets::importEffects(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPresets::importEffects()" );
}
}
@@ -350,13 +334,9 @@ void CustomAnimationPresets::importResources()
importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/Misc", maMiscPresets );
}
- catch (const lang::WrappedTargetException&)
- {
- OSL_FAIL( "sd::CustomAnimationPresets::importResources(), WrappedTargetException caught!" );
- }
catch (const Exception&)
{
- OSL_FAIL( "sd::CustomAnimationPresets::importResources(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPresets::importResources()" );
}
}
@@ -410,7 +390,7 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor
}
catch (const Exception&)
{
- OSL_FAIL( "sd::CustomAnimationPresets::importPresets(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPresets::importPresets()" );
}
#ifdef DEBUG
diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx
index 1a8f55b90aed..19914e3498e4 100644
--- a/sd/source/core/TransitionPreset.cxx
+++ b/sd/source/core/TransitionPreset.cxx
@@ -34,6 +34,7 @@
#include <comphelper/lok.hxx>
#include <unotools/syslocaleoptions.hxx>
#include <officecfg/Office/UI/Effects.hxx>
+#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
#include <osl/diagnose.h>
@@ -354,7 +355,7 @@ bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList )
}
catch( Exception& )
{
- OSL_FAIL( "sd::TransitionPreset::importResources(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::TransitionPreset::importResources()" );
}
return bRet;
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 143b5a47a2fd..a09abf0ecf57 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -26,6 +26,7 @@
#include <sfx2/app.hxx>
#include <svl/itemset.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <sfx2/fcontnr.hxx>
#include <svl/style.hxx>
@@ -931,7 +932,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
}
catch(...)
{
- OSL_FAIL("Exception while renaming styles @ SdDrawDocument::InsertBookmarkAsPage");
+ TOOLS_WARN_EXCEPTION( "sd", "Exception while renaming styles @ SdDrawDocument::InsertBookmarkAsPage");
}
}
// remove copied styles not used on any inserted page and create
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index db487a74471a..d1949de20fb2 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -29,6 +29,7 @@
#include <DrawDocShell.hxx>
#include <editeng/eeitem.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/idle.hxx>
#include <vcl/settings.hxx>
@@ -621,7 +622,7 @@ static void implCreateTableTemplate( const Reference< XNameContainer >& xTableFa
}
catch( Exception& )
{
- OSL_FAIL("sd::implCreateTableTemplate(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::implCreateTableTemplate()");
}
}
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index fb670e9585d4..aa44c9170b83 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -52,6 +52,7 @@
#include <svx/sdtagitm.hxx>
#include <svx/sdtcfitm.hxx>
#include <svx/xfillit0.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/animations/XAnimationNode.hpp>
#include <com/sun/star/animations/XTimeContainer.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
@@ -2713,7 +2714,7 @@ SdPage* SdPage::getImplementation( const css::uno::Reference< css::drawing::XDra
}
catch( css::uno::Exception& )
{
- OSL_FAIL("sd::SdPage::getImplementation(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SdPage::getImplementation()" );
}
return nullptr;
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 30707c9be125..eab931cf0971 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -46,6 +46,7 @@
#include <editeng/emphasismarkitem.hxx>
#include <svx/sdr/table/tabledesign.hxx>
#include <editeng/autokernitem.hxx>
+#include <tools/diagnose_ex.h>
#include <editeng/lrspitem.hxx>
#include <editeng/adjustitem.hxx>
@@ -551,7 +552,7 @@ void SdStyleSheetPool::CopyTableStyles(SdStyleSheetPool const & rSourcePool)
}
catch( Exception& )
{
- OSL_FAIL( "sd::SdStyleSheetPool::CopyTableStyles(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SdStyleSheetPool::CopyTableStyles()" );
}
if( xTargetStyle.is() )
@@ -568,7 +569,7 @@ void SdStyleSheetPool::CopyTableStyles(SdStyleSheetPool const & rSourcePool)
}
catch( Exception& )
{
- OSL_FAIL("sd::SdStyleSheetPool::CopyTableStyles(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SdStyleSheetPool::CopyTableStyles()");
}
}
diff --git a/sd/source/core/undoanim.cxx b/sd/source/core/undoanim.cxx
index 707d14bf885b..64b2333226ea 100644
--- a/sd/source/core/undoanim.cxx
+++ b/sd/source/core/undoanim.cxx
@@ -27,6 +27,7 @@
#include <sdresid.hxx>
#include <CustomAnimationEffect.hxx>
#include <drawdoc.hxx>
+#include <tools/diagnose_ex.h>
namespace com::sun::star::animations { class XAnimationNode; }
@@ -58,7 +59,7 @@ UndoAnimation::UndoAnimation( SdDrawDocument* pDoc, SdPage* pThePage )
}
catch( Exception& )
{
- OSL_FAIL("sd::UndoAnimation::UndoAnimation(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::UndoAnimation::UndoAnimation()");
}
}
@@ -85,7 +86,7 @@ void UndoAnimation::Undo()
}
catch( Exception& )
{
- OSL_FAIL("sd::UndoAnimation::Undo(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::UndoAnimation::Undo()");
}
}
@@ -100,7 +101,7 @@ void UndoAnimation::Redo()
}
catch( Exception& )
{
- OSL_FAIL("sd::UndoAnimation::Redo(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::UndoAnimation::Redo()");
}
}
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index d1659dd730d3..1b8f314dff38 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -58,6 +58,7 @@
#include <filter/msfilter/escherex.hxx>
#include <osl/diagnose.h>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <algorithm>
@@ -393,7 +394,7 @@ void AnimationExporter::processAfterEffectNodes( const Reference< XAnimationNode
}
catch( Exception& )
{
- OSL_FAIL( "(@CL)AnimationExporter::processAfterEffectNodes(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "(@CL)AnimationExporter::processAfterEffectNodes()" );
}
}
diff --git a/sd/source/filter/html/buttonset.cxx b/sd/source/filter/html/buttonset.cxx
index cb382303287f..8f9ec50423a2 100644
--- a/sd/source/filter/html/buttonset.cxx
+++ b/sd/source/filter/html/buttonset.cxx
@@ -33,6 +33,7 @@
#include <vcl/virdev.hxx>
#include <vcl/image.hxx>
#include <unotools/pathoptions.hxx>
+#include <tools/diagnose_ex.h>
#include <memory>
@@ -72,7 +73,7 @@ ButtonsImpl::ButtonsImpl( const OUString& rURL )
}
catch( Exception& )
{
- OSL_FAIL("sd::ButtonsImpl::ButtonsImpl(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::ButtonsImpl::ButtonsImpl()" );
}
}
@@ -87,7 +88,7 @@ Reference< XInputStream > ButtonsImpl::getInputStream( const OUString& rName )
}
catch( Exception& )
{
- OSL_FAIL( "sd::ButtonsImpl::getInputStream(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::ButtonsImpl::getInputStream()" );
}
return xInputStream;
}
@@ -110,7 +111,7 @@ bool ButtonsImpl::getGraphic( const Reference< XGraphicProvider >& xGraphicProvi
}
catch( Exception& )
{
- OSL_FAIL( "sd::ButtonsImpl::getGraphic(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::ButtonsImpl::getGraphic()" );
}
return false;
}
@@ -131,7 +132,7 @@ bool ButtonsImpl::copyGraphic( const OUString& rName, const OUString& rPath )
}
catch( Exception& )
{
- OSL_FAIL( "sd::ButtonsImpl::copyGraphic(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::ButtonsImpl::copyGraphic()" );
}
return false;
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 67e0e0cc66b1..ee22e18fc28a 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -47,6 +47,7 @@
#include <sfx2/objsh.hxx>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <editeng/flstitem.hxx>
@@ -1397,7 +1398,7 @@ void CustomAnimationEffectTabPage::onSoundPreview()
}
catch( uno::Exception& )
{
- OSL_FAIL("CustomAnimationEffectTabPage::onSoundPreview(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "CustomAnimationEffectTabPage::onSoundPreview()" );
}
#endif
}
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index b0299ddf0f20..2b24919a57a0 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -37,6 +37,7 @@
#include <vcl/weldutils.hxx>
#include <tools/debug.hxx>
#include <tools/gen.hxx>
+#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
#include <sdresid.hxx>
@@ -144,7 +145,7 @@ OUString getShapeDescription( const Reference< XShape >& xShape, bool bWithText
}
catch( Exception& )
{
- OSL_FAIL("sd::getShapeDescription(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::getShapeDescription()" );
}
if (bAppendIndex)
@@ -909,7 +910,7 @@ void CustomAnimationList::append( CustomAnimationEffectPtr pEffect )
}
catch (const Exception&)
{
- OSL_FAIL("sd::CustomAnimationList::append(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationList::append()" );
}
}
@@ -963,7 +964,7 @@ void CustomAnimationList::onSelectionChanged(const Any& rSelection)
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationList::onSelectionChanged(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationList::onSelectionChanged()" );
}
}
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 4832de20446a..95a0eb941597 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -51,6 +51,7 @@
#include <comphelper/sequence.hxx>
#include <sfx2/frame.hxx>
#include <sfx2/sidebar/Theme.hxx>
+#include <tools/diagnose_ex.h>
#include <svx/unoapi.hxx>
#include <svx/svxids.hrc>
@@ -194,7 +195,7 @@ void CustomAnimationPane::initialize()
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationPane::CustomAnimationPane(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPane::CustomAnimationPane()" );
}
// get current page and update custom animation list
@@ -845,7 +846,7 @@ void CustomAnimationPane::onSelectionChanged()
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationPane::onSelectionChanged(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPane::onSelectionChanged()" );
}
}
@@ -1659,7 +1660,7 @@ void CustomAnimationPane::onChangeCurrentPage()
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationPane::onChangeCurrentPage(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPane::onChangeCurrentPage()" );
}
}
@@ -1718,7 +1719,7 @@ static bool getTextSelection( const Any& rSelection, Reference< XShape >& xShape
}
catch( Exception& )
{
- OSL_FAIL( "sd::CustomAnimationPane::getTextSelection(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPane::getTextSelection()" );
}
return false;
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index c98b433ee350..d72dba3d8181 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -41,6 +41,7 @@
#include <tools/datetime.hxx>
#include <tools/UnitConversion.hxx>
+#include <tools/diagnose_ex.h>
#include <sfx2/viewfrm.hxx>
#include <sfx2/bindings.hxx>
@@ -185,7 +186,7 @@ void AnnotationManagerImpl::init()
}
catch( Exception& )
{
- OSL_FAIL( "sd::AnnotationManagerImpl::AnnotationManagerImpl(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::AnnotationManagerImpl::AnnotationManagerImpl()" );
}
try
@@ -911,7 +912,7 @@ void AnnotationManagerImpl::onSelectionChanged()
}
catch( Exception& )
{
- OSL_FAIL( "sd::AnnotationManagerImpl::onSelectionChanged(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::AnnotationManagerImpl::onSelectionChanged()" );
}
}
@@ -985,7 +986,7 @@ void AnnotationManagerImpl::CreateTags()
}
catch( Exception& )
{
- OSL_FAIL( "sd::AnnotationManagerImpl::onSelectionChanged(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::AnnotationManagerImpl::onSelectionChanged()" );
}
}
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index a5d599de1a1e..6302608f93cc 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -40,6 +40,7 @@
#include <svx/ImageMapInfo.hxx>
#include <sot/formats.hxx>
#include <svl/urlbmk.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/form/FormButtonType.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -588,7 +589,7 @@ bool SdTransferable::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void*
}
catch( Exception& )
{
- OSL_FAIL( "sd::SdTransferable::WriteObject(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SdTransferable::WriteObject()" );
bRet = false;
}
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index e4f36ff7fe14..0aa637d0dc43 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1456,7 +1456,7 @@ void SlideshowImpl::click( const Reference< XShape >& xShape )
}
catch( uno::Exception& )
{
- OSL_FAIL("sd::SlideshowImpl::click(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::click()" );
}
#endif
}
@@ -2520,7 +2520,7 @@ void SlideshowImpl::setAutoSaveState( bool bOn)
}
catch( Exception& )
{
- OSL_FAIL("sd::SlideshowImpl::setAutoSaveState(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SlideshowImpl::setAutoSaveState()");
}
}
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index d3fba2087432..6a7772cd75de 100644
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -23,6 +23,7 @@
#include <sdpage.hxx>
#include <comphelper/profilezone.hxx>
+#include <tools/diagnose_ex.h>
namespace sd::slidesorter::cache {
@@ -161,13 +162,9 @@ void QueueProcessor::ProcessOneRequest (
}
}
}
- catch (css::uno::RuntimeException &)
- {
- OSL_FAIL("RuntimeException caught in QueueProcessor");
- }
catch (css::uno::Exception &)
{
- OSL_FAIL("Exception caught in QueueProcessor");
+ TOOLS_WARN_EXCEPTION( "sd", "QueueProcessor");
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 47e033bf80a2..6ae302375449 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -43,6 +43,7 @@
#include <view/SlsToolTip.hxx>
#include <cache/SlsPageCache.hxx>
#include <cache/SlsPageCacheManager.hxx>
+#include <tools/diagnose_ex.h>
#include <drawdoc.hxx>
#include <ViewShellBase.hxx>
@@ -157,7 +158,7 @@ SlideSorterController::~SlideSorterController()
}
catch( uno::Exception& )
{
- OSL_FAIL( "sd::SlideSorterController::~SlideSorterController(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SlideSorterController::~SlideSorterController()" );
}
// dispose should have been called by now so that nothing is to be done
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
index 4847ff3114bd..1bda593e16be 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
@@ -29,6 +29,7 @@
#include <model/SlsPageEnumerationProvider.hxx>
#include <model/SlsPageDescriptor.hxx>
#include <view/SlideSorterView.hxx>
+#include <tools/diagnose_ex.h>
#include <drawdoc.hxx>
#include <sdpage.hxx>
#include <drawview.hxx>
@@ -174,7 +175,7 @@ void SelectionManager::DeleteSelectedNormalPages (const ::std::vector<SdPage*>&
}
catch( Exception& )
{
- OSL_FAIL("SelectionManager::DeleteSelectedNormalPages(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "SelectionManager::DeleteSelectedNormalPages()");
}
}
@@ -207,7 +208,7 @@ void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>&
}
catch( Exception& )
{
- OSL_FAIL("SelectionManager::DeleteSelectedMasterPages(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "SelectionManager::DeleteSelectedMasterPages()");
}
}
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 028d8f2a4266..b8c5ccd3cfc9 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -54,6 +54,7 @@
#include <svx/svxids.hrc>
#include <vcl/EnumContext.hxx>
#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::sd::slidesorter;
#define ShellClass_SlideSorterViewShell
@@ -139,7 +140,7 @@ SlideSorterViewShell::~SlideSorterViewShell()
}
catch( css::uno::Exception& )
{
- OSL_FAIL("sd::SlideSorterViewShell::~SlideSorterViewShell(), exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SlideSorterViewShell::~SlideSorterViewShell()" );
}
GetFrameView()->Disconnect();
}
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 0680c268d3b4..4fce1f9bf324 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -35,6 +35,7 @@
#include <vcl/virdev.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <svl/style.hxx>
#include <svl/stritem.hxx>
#include <sfx2/bindings.hxx>
@@ -118,7 +119,7 @@ TableDesignWidget::TableDesignWidget(weld::Builder& rBuilder, ViewShellBase& rBa
}
catch (const Exception&)
{
- OSL_FAIL( "sd::CustomAnimationPane::CustomAnimationPane(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPane::CustomAnimationPane()" );
}
onSelectionChanged();
@@ -197,7 +198,7 @@ void TableDesignWidget::ApplyStyle()
}
catch( Exception& )
{
- OSL_FAIL("TableDesignWidget::implValueSetHdl(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "TableDesignWidget::implValueSetHdl()");
}
}
@@ -272,7 +273,7 @@ void TableDesignWidget::onSelectionChanged()
}
catch( Exception& )
{
- OSL_FAIL( "sd::TableDesignWidget::onSelectionChanged(), Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sd", "sd::TableDesignWidget::onSelectionChanged()" );
}
if( mxSelectedTable != xNewSelection )
@@ -355,7 +356,7 @@ void TableDesignWidget::updateControls()
}
catch( Exception& )
{
- OSL_FAIL("sd::TableDesignWidget::updateControls(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::TableDesignWidget::updateControls()");
}
m_aCheckBoxes[i]->set_active(bUse);
m_aCheckBoxes[i]->set_sensitive(bHasTable);
@@ -505,7 +506,7 @@ static void FillCellInfoVector( const Reference< XIndexAccess >& xTableStyle, Ce
}
catch(Exception&)
{
- OSL_FAIL("sd::FillCellInfoVector(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::FillCellInfoVector()");
}
}
@@ -734,7 +735,7 @@ void TableDesignWidget::FillDesignPreviewControl()
}
catch( Exception& )
{
- OSL_FAIL("sd::TableDesignWidget::FillDesignPreviewControl(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::TableDesignWidget::FillDesignPreviewControl()");
}
sal_Int32 nCols = 3;
sal_Int32 nRows = (nCount+2)/3;
@@ -754,7 +755,7 @@ void TableDesignWidget::FillDesignPreviewControl()
}
catch( Exception& )
{
- OSL_FAIL("sd::TableDesignWidget::FillDesignPreviewControl(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::TableDesignWidget::FillDesignPreviewControl()");
}
m_xValueSet->SelectItem(nSelectedItem);
}
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 6f84adf95d6f..c19445429128 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -35,6 +35,7 @@
#include <sfx2/request.hxx>
#include <sfx2/sidebar/Sidebar.hxx>
#include <svl/style.hxx>
+#include <tools/diagnose_ex.h>
#include <tablefunction.hxx>
#include <DrawViewShell.hxx>
@@ -80,7 +81,7 @@ static void apply_table_style( SdrTableObj* pObj, SdrModel const * pModel, const
}
catch( Exception& )
{
- OSL_FAIL("sd::apply_default_table_style(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::apply_default_table_style()");
}
}
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 11417c30651b..54a779ade127 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -37,6 +37,7 @@
#include <vcl/bitmapex.hxx>
#include <vcl/metaact.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
#include <AnnotationEnumeration.hxx>
#include <createunopageimpl.hxx>
@@ -2860,7 +2861,7 @@ void SdMasterPage::setBackground( const Any& rValue )
}
catch( Exception& )
{
- OSL_FAIL("sd::SdMasterPage::setBackground(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SdMasterPage::setBackground()");
}
}
@@ -2917,8 +2918,8 @@ void SdMasterPage::getBackground( Any& rValue )
}
catch( Exception& )
{
+ TOOLS_WARN_EXCEPTION( "sd", "sd::SdMasterPage::getBackground()");
rValue.clear();
- OSL_FAIL("sd::SdMasterPage::getBackground(), exception caught!");
}
}
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index b6a9d424a8db..ee6ab513e4f0 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -40,6 +40,7 @@
#include <editeng/editview.hxx>
#include <vcl/cursor.hxx>
#include <vcl/commandevent.hxx>
+#include <tools/diagnose_ex.h>
#include <app.hrc>
#include <strings.hrc>
@@ -102,7 +103,7 @@ void DrawViewShell::DeleteActualPage()
}
catch( Exception& )
{
- OSL_FAIL("SelectionManager::DeleteSelectedMasterPages(), exception caught!");
+ TOOLS_WARN_EXCEPTION( "sd", "SelectionManager::DeleteSelectedMasterPages()");
}
}
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index a01f5d6a6bdc..9f83906fbd65 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -286,7 +286,7 @@ IMPL_LINK(ContentTabPage_Impl, ExpandingHdl, const weld::TreeIter&, rIter, bool)
}
catch (const Exception&)
{
- OSL_FAIL( "ContentListBox_Impl::RequestingChildren(): unexpected exception" );
+ TOOLS_WARN_EXCEPTION( "sfx.appl", "ContentListBox_Impl::RequestingChildren(): unexpected exception" );
}
}
@@ -678,7 +678,7 @@ void IndexTabPage_Impl::InitializeIndex()
}
catch( Exception& )
{
- OSL_FAIL( "IndexTabPage_Impl::InitializeIndex(): unexpected exception" );
+ TOOLS_WARN_EXCEPTION( "sfx.appl", "IndexTabPage_Impl::InitializeIndex(): unexpected exception" );
}
m_xIndexList->thaw();
@@ -1793,7 +1793,7 @@ Reference< XTextRange > SfxHelpTextWindow_Impl::getCursor() const
}
catch( Exception& )
{
- OSL_FAIL( "SfxHelpTextWindow_Impl::getCursor(): unexpected exception" );
+ TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::getCursor(): unexpected exception" );
}
return xCursor;
@@ -1853,7 +1853,7 @@ IMPL_LINK_NOARG(SfxHelpTextWindow_Impl, SelectHdl, Timer *, void)
}
catch( Exception& )
{
- OSL_FAIL( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" );
+ TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" );
}
}
@@ -1942,7 +1942,7 @@ void SfxHelpTextWindow_Impl::FindHdl(sfx2::SearchDialog* pDlg)
}
catch( Exception& )
{
- OSL_FAIL( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" );
+ TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" );
}
}
@@ -2408,7 +2408,7 @@ void SfxHelpWindow_Impl::openDone(const OUString& sURL ,
}
catch( Exception& )
{
- OSL_FAIL( "SfxHelpWindow_Impl::OpenDoneHdl(): unexpected exception" );
+ TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpWindow_Impl::OpenDoneHdl(): unexpected exception" );
}
// When the SearchPage opens the help doc, then select all words, which are equal to its text
@@ -2615,7 +2615,7 @@ void SfxHelpWindow_Impl::DoAction(std::string_view rActionId)
}
catch( Exception& )
{
- OSL_FAIL( "SfxHelpWindow_Impl::DoAction(): unexpected exception" );
+ TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpWindow_Impl::DoAction(): unexpected exception" );
}
}
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 9c442d01e837..1b39b59bf0c8 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1176,7 +1176,7 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con
}
catch( const Exception& )
{
- OSL_FAIL( "FileDialogHelper_Impl::setControlHelpIds: caught an exception while setting the help ids!" );
+ TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::setControlHelpIds: caught an exception while setting the help ids!" );
}
}
@@ -1441,7 +1441,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList,
}
catch( const IllegalArgumentException& )
{
- OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" );
+ TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" );
}
}
@@ -1462,7 +1462,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList,
}
catch( const IllegalArgumentException& )
{
- OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" );
+ TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" );
}
}
}
@@ -2201,7 +2201,7 @@ void FileDialogHelper_Impl::setDefaultValues()
}
catch( const Exception& )
{
- OSL_FAIL( "FileDialogHelper_Impl::setDefaultValues: caught an exception while setting the display directory!" );
+ TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::setDefaultValues: caught an exception while setting the display directory!" );
}
}
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 182c20296d9e..4247bc272717 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -44,6 +44,7 @@
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
@@ -1679,7 +1680,7 @@ static OUString getModuleIdentifier( const Reference< XModuleManager2 >& i_xModM
}
catch ( Exception& )
{
- OSL_FAIL( "getModuleIdentifier(): exception of XModuleManager::identify()" );
+ TOOLS_WARN_EXCEPTION( "sfx", "getModuleIdentifier(): exception of XModuleManager::identify()" );
}
return sIdentifier;
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index b12d251924f1..9f7b97bc36c7 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <comphelper/random.hxx>
+#include <tools/diagnose_ex.h>
#include <algorithm>
#include <memory>
@@ -1267,7 +1268,7 @@ void Metadatable::RemoveMetadataReference()
}
catch (const uno::Exception &)
{
- OSL_FAIL("Metadatable::RemoveMetadataReference: exception");
+ TOOLS_WARN_EXCEPTION( "sfx.doc", "Metadatable::RemoveMetadataReference");
}
}
@@ -1424,7 +1425,7 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource,
}
catch (const uno::Exception &)
{
- OSL_FAIL("Metadatable::RegisterAsCopyOf: exception");
+ TOOLS_WARN_EXCEPTION( "sfx.doc", "Metadatable::RegisterAsCopyOf");
}
}
@@ -1448,7 +1449,7 @@ std::shared_ptr<MetadatableUndo> Metadatable::CreateUndo() const
}
catch (const uno::Exception &)
{
- OSL_FAIL("Metadatable::CreateUndo: exception");
+ TOOLS_WARN_EXCEPTION( "sfx.doc", "Metadatable::CreateUndo");
}
return std::shared_ptr<MetadatableUndo>();
}
@@ -1518,7 +1519,7 @@ Metadatable::JoinMetadatable(Metadatable const & i_rOther,
}
catch (const uno::Exception &)
{
- OSL_FAIL("Metadatable::JoinMetadatable: exception");
+ TOOLS_WARN_EXCEPTION( "sfx.doc", "Metadatable::JoinMetadatable");
}
}
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 19649cc26ff9..1cff1409d723 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -40,6 +40,7 @@
#include <svl/stritem.hxx>
#include <memory>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
@@ -240,7 +241,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void
}
catch( const IllegalArgumentException& )
{
- OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" );
+ TOOLS_WARN_EXCEPTION( "sfx.doc", "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" );
}
}
@@ -261,7 +262,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void
}
catch( const IllegalArgumentException& )
{
- OSL_FAIL( "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" );
+ TOOLS_WARN_EXCEPTION( "sfx.doc", "FileDialogHelper_Impl::execute: caught an IllegalArgumentException!" );
}
}
}
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 736b7d229d4b..42ad906e07d7 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -241,7 +241,7 @@ public:
}
catch( const uno::Exception& )
{
- OSL_FAIL( "Unexpected exception!" );
+ TOOLS_WARN_EXCEPTION( "sfx.doc", "" );
}
}
}
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index e2ce74172288..09d1c506522c 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -38,6 +38,7 @@
#include <osl/file.hxx>
#include <osl/thread.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <ucbhelper/content.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <osl/mutex.hxx>
@@ -539,21 +540,9 @@ class ImplUCBPrintWatcher : public ::osl::Thread
css::ucb::NameClash::OVERWRITE);
}
}
- catch (const css::ucb::ContentCreationException&)
- {
- OSL_FAIL("content create exception");
- }
- catch (const css::ucb::CommandAbortedException&)
- {
- OSL_FAIL("command abort exception");
- }
- catch (const css::uno::RuntimeException&)
- {
- OSL_FAIL("runtime exception");
- }
catch (const css::uno::Exception&)
{
- OSL_FAIL("unknown exception");
+ TOOLS_WARN_EXCEPTION( "sfx.doc", "");
}
// kill the temp file!
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index efd6a4e67a96..cdfa36ff82ed 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -32,6 +32,7 @@
#include <svl/stritem.hxx>
#include <tools/svborder.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <appdata.hxx>
#include <sfx2/app.hxx>
@@ -639,7 +640,7 @@ void SfxFrame::CreateWorkWindow_Impl()
}
catch(Exception&)
{
- OSL_FAIL("SfxFrame::CreateWorkWindow_Impl: Exception caught. Please try to submit a reproducible bug!");
+ TOOLS_WARN_EXCEPTION( "sfx.view", "SfxFrame::CreateWorkWindow_Impl: Exception caught. Please try to submit a reproducible bug!");
}
}
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index 4adc0ce37e7c..58b3203dfb74 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -1022,7 +1022,7 @@ bool SlideImpl::loadShapes()
catch( ShapeLoadFailedException& )
{
// TODO(E2): Error handling. For now, bail out
- OSL_FAIL( "SlideImpl::loadShapes(): caught ShapeLoadFailedException" );
+ TOOLS_WARN_EXCEPTION( "slideshow", "SlideImpl::loadShapes(): caught ShapeLoadFailedException" );
return false;
}
@@ -1062,7 +1062,7 @@ bool SlideImpl::loadShapes()
catch( ShapeLoadFailedException& )
{
// TODO(E2): Error handling. For now, bail out
- OSL_FAIL( "SlideImpl::loadShapes(): caught ShapeLoadFailedException" );
+ TOOLS_WARN_EXCEPTION( "slideshow", "SlideImpl::loadShapes(): caught ShapeLoadFailedException" );
return false;
}
catch( uno::Exception& )
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index d6c80d16b5dc..972b4f9d9b0f 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -26,6 +26,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
#include <rtl/ustring.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -1362,7 +1363,7 @@ sal_Bool ImplementationRegistration::revokeImplementation(const OUString& locati
{
// no way to transport the error, as no exception is specified and a runtime
// exception is not appropriate.
- OSL_FAIL( "InvalidRegistryException during revokeImplementation" );
+ TOOLS_WARN_EXCEPTION( "stoc", "InvalidRegistryException during revokeImplementation" );
}
}
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 8600a23eb759..bbc962c17466 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -1133,7 +1133,7 @@ JavaVirtualMachine::~JavaVirtualMachine()
}
catch (css::uno::Exception &)
{
- OSL_FAIL("com.sun.star.uno.Exception caught");
+ TOOLS_WARN_EXCEPTION( "stoc", "");
}
if (m_xJavaConfiguration.is())
// We should never get here, but just in case...
@@ -1143,7 +1143,7 @@ JavaVirtualMachine::~JavaVirtualMachine()
}
catch (css::uno::Exception &)
{
- OSL_FAIL("com.sun.star.uno.Exception caught");
+ TOOLS_WARN_EXCEPTION( "stoc", "");
}
}
@@ -1342,11 +1342,11 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset)
}
catch (css::uno::RuntimeException &)
{
- OSL_FAIL("RuntimeException");
+ TOOLS_WARN_EXCEPTION( "stoc", "");
}
catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
{
- OSL_FAIL("jvmaccess::VirtualMachine::AttachGuard::CreationException");
+ TOOLS_WARN_EXCEPTION( "stoc", "");
}
}
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index ba728ba1fa88..628bdb877b23 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -288,11 +288,11 @@ void OServiceManager_Listener::disposing(const EventObject & rEvt )
}
catch( const IllegalArgumentException & )
{
- OSL_FAIL( "IllegalArgumentException caught" );
+ TOOLS_WARN_EXCEPTION( "stoc", "" );
}
catch( const NoSuchElementException & )
{
- OSL_FAIL( "NoSuchElementException caught" );
+ TOOLS_WARN_EXCEPTION( "stoc", "" );
}
}
diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx
index 3bc8dc8f5b4c..8e6336a819ae 100644
--- a/svtools/source/brwbox/editbrowsebox2.cxx
+++ b/svtools/source/brwbox/editbrowsebox2.cxx
@@ -27,6 +27,7 @@
#include <vcl/svapp.hxx>
#include <osl/diagnose.h>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
namespace svt
{
@@ -110,7 +111,7 @@ void EditBrowseBoxImpl::clearActiveCell()
}
catch(const Exception&)
{
- OSL_FAIL( "EditBrowseBoxImpl::clearActiveCell: caught an exception while disposing the AccessibleCell!" );
+ TOOLS_WARN_EXCEPTION( "svtools", "EditBrowseBoxImpl::clearActiveCell: caught an exception while disposing the AccessibleCell!" );
}
m_xActiveCell = nullptr;
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index f3a3bbd03fd3..e95d127f2147 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -30,6 +30,7 @@
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
#include <com/sun/star/util/AliasProgrammaticPair.hpp>
#include <com/sun/star/ui/dialogs/AddressBookSourcePilot.hpp>
@@ -701,7 +702,7 @@ void AssignmentPersistentData::ImplCommit()
}
catch(Exception&)
{
- OSL_FAIL("AddressBookSourceDialog::initializeDatasources: caught an exception while asking for the data source names!");
+ TOOLS_WARN_EXCEPTION( "svtools", "AddressBookSourceDialog::initializeDatasources: caught an exception while asking for the data source names!");
}
}
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index f87997e5c24c..56ca4c141a3e 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -214,7 +214,7 @@ bool FmSearchEngine::MoveCursor()
}
catch(...)
{
- OSL_FAIL("FmSearchEngine::MoveCursor : caught an unknown Exception !");
+ TOOLS_WARN_EXCEPTION( "svx", "FmSearchEngine::MoveCursor : caught an unknown Exception !");
bSuccess = false;
}
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index 943cb8c415d2..cb0b337acf06 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -29,6 +29,7 @@
#include <sot/stg.hxx>
#include <sfx2/docfile.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/ucbstreamhelper.hxx>
#include <comphelper/storagehelper.hxx>
@@ -91,7 +92,7 @@ SwXMLTextBlocks::SwXMLTextBlocks( const OUString& rFile )
}
catch(const uno::Exception&)
{
- OSL_FAIL("exception while creating AutoText storage");
+ TOOLS_WARN_EXCEPTION( "sw", "exception while creating AutoText storage");
}
}
InitBlockMode ( refStg );
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 16fb03cfb941..d3725ea03bb5 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/uno/Any.h>
#include <SwStyleNameMapper.hxx>
+#include <tools/diagnose_ex.h>
#include <fmtmeta.hxx>
#include <ndtxt.hxx>
@@ -743,7 +744,7 @@ void MetaField::GetPrefixAndSuffix(
}
catch (const uno::Exception&)
{
- OSL_FAIL("exception?");
+ TOOLS_WARN_EXCEPTION( "sw", "");
}
}
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 9bfa185afb63..6e1e3631dbde 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -31,6 +31,7 @@
#include <o3tl/any.hxx>
#include <tools/urlobj.hxx>
#include <tools/datetime.hxx>
+#include <tools/diagnose_ex.h>
#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
#include <ucbhelper/contentidentifier.hxx>
@@ -69,7 +70,7 @@ bool UCB_DeleteFile( const OUString& rURL )
catch( css::uno::Exception& )
{
bRemoved = false;
- OSL_FAIL( "Exception from executeCommand( delete )" );
+ TOOLS_WARN_EXCEPTION( "sw", "Exception from executeCommand( delete )" );
}
return bRemoved;
}
@@ -97,7 +98,7 @@ bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL )
}
catch( css::uno::Exception& )
{
- OSL_FAIL( "Exception from executeCommand( transfer )" );
+ TOOLS_WARN_EXCEPTION( "sw", "Exception from executeCommand( transfer )" );
bCopyCompleted = false;
}
return bCopyCompleted;
@@ -126,7 +127,7 @@ bool UCB_IsCaseSensitiveFileName( const OUString& rURL )
catch( css::uno::Exception& )
{
bCaseSensitive = false;
- OSL_FAIL( "Exception from compareContentIds()" );
+ TOOLS_WARN_EXCEPTION( "sw", "compareContentIds()" );
}
return bCaseSensitive;
}
@@ -245,13 +246,13 @@ bool UCB_GetFileListOfFolder( const OUString& rURL,
}
catch( css::uno::Exception& )
{
- OSL_FAIL( "Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sw", "" );
}
}
}
catch( css::uno::Exception& )
{
- OSL_FAIL( "Exception caught!" );
+ TOOLS_WARN_EXCEPTION( "sw", "" );
bOk = false;
}
return bOk;
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 4077e90ab831..9b4b0ea77c36 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -23,6 +23,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <cmdid.h>
#include <unomid.h>
@@ -677,7 +678,7 @@ SwXParagraph::setPropertyValuesTolerant(
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- OSL_FAIL( "unexpected exception caught" );
+ TOOLS_WARN_EXCEPTION( "sw", "unexpected exception caught" );
pFailed[ nFailed++ ].Result =
beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
@@ -816,7 +817,7 @@ SwXParagraph::Impl::GetPropertyValuesTolerant_Impl(
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- OSL_FAIL( "unexpected exception caught" );
+ TOOLS_WARN_EXCEPTION( "sw", "unexpected exception caught" );
rResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
catch (lang::IllegalArgumentException &)
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index ea0bca136e13..84cf32fbf0b0 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -23,6 +23,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <vcl/svapp.hxx>
#include <svl/itemprop.hxx>
+#include <tools/diagnose_ex.h>
#include <unocrsrhelper.hxx>
#include <unoparaframeenum.hxx>
@@ -523,7 +524,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL SwXTextPortion::setPr
catch (beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- OSL_FAIL( "unexpected exception caught" );
+ TOOLS_WARN_EXCEPTION( "sw", "" );
pFailed[ nFailed++ ].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
catch (lang::IllegalArgumentException &)
@@ -633,7 +634,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SwXTextPortion::GetPrope
catch (const beans::UnknownPropertyException &)
{
// should not occur because property was searched for before
- OSL_FAIL( "unexpected exception caught" );
+ TOOLS_WARN_EXCEPTION( "sw", "unexpected exception caught" );
aResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
catch (const lang::IllegalArgumentException &)
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index bb39dc917cc6..0a5c68b18719 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -65,6 +65,7 @@
#include <unotools/saveopt.hxx>
#include <unotools/streamwrap.hxx>
#include <tools/helpers.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
#include <unotxdoc.hxx>
@@ -1417,7 +1418,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
}
catch( Exception& )
{
- OSL_FAIL( "SwXMLImport::SetConfigurationSettings: Exception!" );
+ TOOLS_WARN_EXCEPTION( "sw", "SwXMLImport::SetConfigurationSettings" );
}
}
}
@@ -1434,7 +1435,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
xProps->setPropertyValue(embeddedDatabaseName->Name, embeddedDatabaseName->Value);
} catch( Exception& )
{
- OSL_FAIL( "SwXMLImport::SetConfigurationSettings: Exception!" );
+ TOOLS_WARN_EXCEPTION( "sw", "SwXMLImport::SetConfigurationSettings" );
}
// finally, treat the non-default cases
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 11c95bc0b478..f30a39a26080 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -48,6 +48,7 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <swunohelper.hxx>
#include <unotools/pathoptions.hxx>
+#include <tools/diagnose_ex.h>
#include <svl/urihelper.hxx>
#include <strings.hrc>
#include <view.hxx>
@@ -270,7 +271,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl, weld::Button&, void)
}
catch (const Exception&)
{
- OSL_FAIL("exception caught in SwAddressListDialog::FilterHdl_Impl");
+ TOOLS_WARN_EXCEPTION( "sw", "exception caught in SwAddressListDialog::FilterHdl_Impl");
}
}
@@ -556,7 +557,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
}
catch (const Exception&)
{
- OSL_FAIL("exception caught in SwAddressListDialog::DetectTablesAndQueries");
+ TOOLS_WARN_EXCEPTION( "sw", "exception caught in SwAddressListDialog::DetectTablesAndQueries");
m_xOK->set_sensitive(false);
}
}
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index d45f24093fd5..8287e064ec43 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <tools/diagnose_ex.h>
#include <swmodule.hxx>
#include <view.hxx>
@@ -163,7 +164,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
}
catch (const sdbc::SQLException&)
{
- OSL_FAIL("SQLException caught");
+ TOOLS_WARN_EXCEPTION( "sw", "");
}
}
}
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index 05d9ee2e0e84..3faac515beab 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <comphelper/string.hxx>
#include <tools/UnitConversion.hxx>
+#include <tools/diagnose_ex.h>
#include <wrtsh.hxx>
#include <view.hxx>
#include <cnttab.hxx>
@@ -118,7 +119,7 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void
}
catch (const Exception&)
{
- OSL_FAIL("::CreateExample() - exception caught");
+ TOOLS_WARN_EXCEPTION( "sw", "::CreateExample()");
}
}
@@ -385,7 +386,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
}
catch (const Exception&)
{
- OSL_FAIL("::CreateExample() - exception caught");
+ TOOLS_WARN_EXCEPTION( "sw", "::CreateExample()");
}
m_xExampleFrame->Invalidate();
}
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 19318862a4cd..0d086e9c8b29 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -36,6 +36,7 @@
#include <vcl/event.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
#include <sfx2/passwd.hxx>
@@ -154,7 +155,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
}
catch (const uno::Exception&)
{
- OSL_FAIL("exception caught");
+ TOOLS_WARN_EXCEPTION( "sw", "");
}
return xSmtpServer;
}
@@ -258,7 +259,7 @@ OUString SwAddressPreview::FillData(
}
catch (const sdbc::SQLException&)
{
- OSL_FAIL("SQLException caught");
+ TOOLS_WARN_EXCEPTION( "sw", "");
}
}
}
diff --git a/sw/source/uibase/fldui/xfldui.cxx b/sw/source/uibase/fldui/xfldui.cxx
index 96321fab72e0..ca5d62a54ec4 100644
--- a/sw/source/uibase/fldui/xfldui.cxx
+++ b/sw/source/uibase/fldui/xfldui.cxx
@@ -18,6 +18,7 @@
*/
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
@@ -108,7 +109,7 @@ bool SwFieldMgr::IsDBNumeric( const OUString& rDBName, const OUString& rTableQry
}
catch (const Exception&)
{
- OSL_FAIL("Exception in getColumns()");
+ TOOLS_WARN_EXCEPTION( "sw", "getColumns()");
}
if(xCols.is() && xCols->hasByName(rFieldName))
{
diff --git a/sw/source/uibase/uno/dlelstnr.cxx b/sw/source/uibase/uno/dlelstnr.cxx
index 76a66603928b..19a0aa34efb2 100644
--- a/sw/source/uibase/uno/dlelstnr.cxx
+++ b/sw/source/uibase/uno/dlelstnr.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp>
#include <unotools/lingucfg.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/uno/Reference.h>
#include <comphelper/processfactory.hxx>
@@ -62,7 +63,7 @@ SwLinguServiceEventListener::SwLinguServiceEventListener()
}
catch (const uno::Exception&)
{
- OSL_FAIL("exception caught in SwLinguServiceEventListener c-tor" );
+ TOOLS_WARN_EXCEPTION( "sw", "SwLinguServiceEventListener c-tor" );
}
}
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 2e47a54e1256..65a4aabf5bf9 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -25,6 +25,7 @@
#include <sfx2/app.hxx>
#include <sfx2/docfilt.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -259,7 +260,7 @@ namespace
}
catch (const Exception&)
{
- OSL_FAIL("DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" );
+ TOOLS_WARN_EXCEPTION( "sw", "DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" );
bSuccess = true;
// can't do anything here ...
}
diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx b/toolkit/source/controls/accessiblecontrolcontext.cxx
index c2d0b46db6a6..36b6287d65ec 100644
--- a/toolkit/source/controls/accessiblecontrolcontext.cxx
+++ b/toolkit/source/controls/accessiblecontrolcontext.cxx
@@ -95,7 +95,7 @@ namespace toolkit
}
catch( const Exception& )
{
- OSL_FAIL( "OAccessibleControlContext::create: caught an exception from the late ctor!" );
+ TOOLS_WARN_EXCEPTION( "toolkit", "OAccessibleControlContext::create: caught an exception from the late ctor!" );
}
return pNew;
}
diff --git a/toolkit/source/controls/filectrl.cxx b/toolkit/source/controls/filectrl.cxx
index bea09aeb7e12..e3b2fd8abcb5 100644
--- a/toolkit/source/controls/filectrl.cxx
+++ b/toolkit/source/controls/filectrl.cxx
@@ -26,6 +26,7 @@
#include <osl/diagnose.h>
#include <svl/svlresid.hxx>
#include <svl/svl.hrc>
+#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <vcl/toolkit/edit.hxx>
@@ -237,7 +238,7 @@ IMPL_LINK_NOARG(FileControl, ButtonHdl, Button*, void)
}
catch( const Exception& )
{
- OSL_FAIL( "FileControl::ImplBrowseFile: caught an exception while executing the file picker!" );
+ TOOLS_WARN_EXCEPTION( "toolkit", "FileControl::ImplBrowseFile: caught an exception while executing the file picker!" );
}
}
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
index 458389e03060..e3eff3f78dd4 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
@@ -136,7 +136,7 @@ Storage::~Storage()
}
catch ( ... )
{
- OSL_FAIL( "Storage::~Storage - Caught exception!" );
+ TOOLS_WARN_EXCEPTION( "ucb", "Storage::~Storage - Caught exception!" );
}
}
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index 59c5fbba8224..7c604d1067dc 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -197,7 +197,7 @@ namespace utl
}
catch(Exception&)
{
- OSL_FAIL("OConfigurationNode::getNodeNames: caught a generic exception!");
+ TOOLS_WARN_EXCEPTION( "unotools", "OConfigurationNode::getNodeNames");
}
}
@@ -219,13 +219,9 @@ namespace utl
{
SAL_WARN( "unotools", "OConfigurationNode::removeNode: there is no element named: " << _rName );
}
- catch (WrappedTargetException&)
- {
- OSL_FAIL("OConfigurationNode::removeNode: caught a WrappedTargetException!");
- }
catch(Exception&)
{
- OSL_FAIL("OConfigurationNode::removeNode: caught a generic exception!");
+ TOOLS_WARN_EXCEPTION( "unotools", "OConfigurationNode::removeNode");
}
}
return false;
@@ -311,7 +307,7 @@ namespace utl
}
catch(Exception&)
{
- OSL_FAIL("OConfigurationNode::openNode: caught an exception while retrieving the node!");
+ TOOLS_WARN_EXCEPTION( "unotools", "OConfigurationNode::openNode: caught an exception while retrieving the node!");
}
return OConfigurationNode();
}
@@ -398,21 +394,9 @@ namespace utl
}
}
- catch(IllegalArgumentException&)
- {
- OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught an IllegalArgumentException!");
- }
- catch(NoSuchElementException&)
- {
- OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught a NoSuchElementException!");
- }
- catch(WrappedTargetException&)
- {
- OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught a WrappedTargetException!");
- }
catch(Exception&)
{
- OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught a generic Exception!");
+ TOOLS_WARN_EXCEPTION( "unotools", "OConfigurationNode::setNodeValue: could not replace the value");
}
}
diff --git a/unotools/source/misc/sharedunocomponent.cxx b/unotools/source/misc/sharedunocomponent.cxx
index 789054104a31..41a383d1004c 100644
--- a/unotools/source/misc/sharedunocomponent.cxx
+++ b/unotools/source/misc/sharedunocomponent.cxx
@@ -133,7 +133,7 @@ namespace utl
catch( const CloseVetoException& ) { /* fine */ }
catch( const Exception& )
{
- OSL_FAIL( "CloseableComponentImpl::nf_closeComponent: caught an unexpected exception!" );
+ TOOLS_WARN_EXCEPTION( "unotools", "CloseableComponentImpl::nf_closeComponent: caught an unexpected exception!" );
}
// reset
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index 7eaa8095511f..3a4ddc5fe821 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -77,7 +77,7 @@ namespace DOM
is.aInputStream = aContent.openStream();
} catch (const css::uno::Exception&) {
- OSL_FAIL("exception in default entity resolver");
+ TOOLS_WARN_EXCEPTION( "unoxml", "exception in default entity resolver");
is.aInputStream.clear();
}
return is;
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index a9c72d06f244..ec8cb02258db 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -923,7 +923,7 @@ UUIInteractionHelper::getInteractionHandlerList(
}
catch ( uno::Exception const & )
{
- OSL_FAIL( "GetInteractionHandlerList - Caught Exception!" );
+ TOOLS_WARN_EXCEPTION( "uui", "GetInteractionHandlerList" );
}
}
diff --git a/vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx b/vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx
index 2442e6ab665d..cbce84b09fd1 100644
--- a/vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx
@@ -43,6 +43,7 @@
#include <rtl/strbuf.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include "atkwrapper.hxx"
#include "atkregistry.hxx"
@@ -414,7 +415,7 @@ wrapper_get_n_children( AtkObject *atk_obj )
n = obj->mpContext->getAccessibleChildCount();
}
catch(const uno::Exception&) {
- OSL_FAIL("Exception in getAccessibleChildCount()" );
+ TOOLS_WARN_EXCEPTION( "vcl", "Exception" );
}
}
@@ -446,7 +447,7 @@ wrapper_ref_child( AtkObject *atk_obj,
child = atk_object_wrapper_ref( xAccessible );
}
catch(const uno::Exception&) {
- OSL_FAIL("Exception in getAccessibleChild");
+ TOOLS_WARN_EXCEPTION( "vcl", "getAccessibleChild");
}
}
diff --git a/vcl/win/dtrans/WinClipboard.cxx b/vcl/win/dtrans/WinClipboard.cxx
index f553ba3dd34e..f50c1810f4ea 100644
--- a/vcl/win/dtrans/WinClipboard.cxx
+++ b/vcl/win/dtrans/WinClipboard.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/datatransfer/clipboard/ClipboardEvent.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -268,7 +269,7 @@ void CWinClipboard::notifyAllClipboardListener()
}
catch (uno::RuntimeException&)
{
- OSL_FAIL("RuntimeException caught");
+ TOOLS_WARN_EXCEPTION("vcl", "");
}
}
}
diff --git a/vcl/win/dtrans/XNotifyingDataObject.cxx b/vcl/win/dtrans/XNotifyingDataObject.cxx
index a989b47e938d..e791f5cd97d0 100644
--- a/vcl/win/dtrans/XNotifyingDataObject.cxx
+++ b/vcl/win/dtrans/XNotifyingDataObject.cxx
@@ -18,6 +18,7 @@
*/
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include "XNotifyingDataObject.hxx"
#include "WinClipboard.hxx"
@@ -141,7 +142,7 @@ void CXNotifyingDataObject::lostOwnership( )
}
catch(RuntimeException&)
{
- OSL_FAIL( "RuntimeException caught" );
+ TOOLS_WARN_EXCEPTION( "vcl", "" );
}
}
diff --git a/vcl/win/dtrans/source.cxx b/vcl/win/dtrans/source.cxx
index 1e76dc2250f5..81275560a806 100644
--- a/vcl/win/dtrans/source.cxx
+++ b/vcl/win/dtrans/source.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/awt/MouseEvent.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <o3tl/any.hxx>
+#include <tools/diagnose_ex.h>
#include <process.h>
#include <memory>
@@ -181,7 +182,7 @@ void SAL_CALL DragSource::startDrag(
}
catch(RuntimeException&)
{
- OSL_FAIL("Runtime exception during event dispatching");
+ TOOLS_WARN_EXCEPTION( "vcl", "Runtime exception during event dispatching");
}
}
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 556e5abc495d..3e50c10ee4b4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2058,7 +2058,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
}
catch(const lang::IllegalArgumentException&)
{
- OSL_FAIL( "IllegalArgumentException in DomainMapper_Impl::finishParagraph" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "DomainMapper_Impl::finishParagraph" );
}
catch(const uno::Exception&)
{
@@ -2216,11 +2216,11 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper
}
catch(const lang::IllegalArgumentException&)
{
- OSL_FAIL( "IllegalArgumentException in DomainMapper_Impl::appendTextPortion" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "DomainMapper_Impl::appendTextPortion" );
}
catch(const uno::Exception&)
{
- OSL_FAIL( "Exception in DomainMapper_Impl::appendTextPortion" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "DomainMapper_Impl::appendTextPortion" );
}
}
@@ -2350,7 +2350,7 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const std::share
}
catch( const uno::Exception& )
{
- OSL_FAIL( "Exception in creation of OLE object" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "in creation of OLE object" );
}
}
@@ -2405,7 +2405,7 @@ void DomainMapper_Impl::appendStarMath( const Value& val )
}
catch( const uno::Exception& )
{
- OSL_FAIL( "Exception in creation of StarMath object" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "in creation of StarMath object" );
}
}
@@ -2699,7 +2699,7 @@ void DomainMapper_Impl::CreateRedline(uno::Reference<text::XTextRange> const& xR
}
catch( const uno::Exception & )
{
- OSL_FAIL( "Exception in makeRedline" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "in makeRedline" );
}
}
@@ -6446,11 +6446,11 @@ void DomainMapper_Impl::PopFieldContext()
}
catch(const lang::IllegalArgumentException&)
{
- OSL_FAIL( "IllegalArgumentException in PopFieldContext()" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "PopFieldContext()" );
}
catch(const uno::Exception&)
{
- OSL_FAIL( "exception in PopFieldContext()" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "PopFieldContext()" );
}
}
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index 46cb83f4c732..f7cc322d808a 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -321,7 +321,7 @@ OUString OLEHandler::copyOLEOStream(
}
catch( const uno::Exception& )
{
- OSL_FAIL("exception in OLEHandler::createOLEObject");
+ TOOLS_WARN_EXCEPTION( "writerfilter", "OLEHandler::createOLEObject");
}
return sRet;
}
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 335108f3c609..40dc5e0da8cc 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -677,7 +677,7 @@ void SectionPropertyMap::DontBalanceTextColumns()
}
catch ( const uno::Exception& )
{
- OSL_FAIL( "Exception in SectionPropertyMap::DontBalanceTextColumns" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "SectionPropertyMap::DontBalanceTextColumns" );
}
}
@@ -792,7 +792,7 @@ uno::Reference< text::XTextColumns > SectionPropertyMap::ApplyColumnProperties(
}
catch ( const uno::Exception& )
{
- OSL_FAIL( "Exception in SectionPropertyMap::ApplyColumnProperties" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "SectionPropertyMap::ApplyColumnProperties" );
}
return xColumns;
}
@@ -1854,7 +1854,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
}
catch ( const uno::Exception& )
{
- OSL_FAIL( "Exception in SectionPropertyMap::CloseSectionGroup" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "SectionPropertyMap::CloseSectionGroup" );
}
}
@@ -2004,7 +2004,7 @@ void SectionPropertyMap::ApplyProperties_( const uno::Reference< beans::XPropert
}
catch ( const uno::Exception& )
{
- OSL_FAIL( "Exception in SectionPropertyMap::ApplyProperties_" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "SectionPropertyMap::ApplyProperties_" );
}
}
for ( size_t i = 0; i < vNames.size(); ++i )
@@ -2016,7 +2016,7 @@ void SectionPropertyMap::ApplyProperties_( const uno::Reference< beans::XPropert
}
catch ( const uno::Exception& )
{
- OSL_FAIL( "Exception in SectionPropertyMap::ApplyProperties_" );
+ TOOLS_WARN_EXCEPTION( "writerfilter", "SectionPropertyMap::ApplyProperties_" );
}
}
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index a67a7aed972e..731facdaff84 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1556,7 +1556,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
}
catch( const uno::Exception& )
{
- OSL_FAIL( "setPropertyValue exception");
+ TOOLS_WARN_EXCEPTION( "writerfilter", "setPropertyValue");
}
}
}
@@ -1577,7 +1577,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
}
catch( const uno::Exception& )
{
- OSL_FAIL( "setPropertyValue exception");
+ TOOLS_WARN_EXCEPTION( "writerfilter", "exception");
}
}
}
@@ -1629,7 +1629,7 @@ OUString StyleSheetTable::getOrCreateCharStyle( PropertyValueVector_t& rCharProp
}
catch( const uno::Exception& )
{
- OSL_FAIL( "Exception in StyleSheetTable::getOrCreateCharStyle - Style::setPropertyValue");
+ TOOLS_WARN_EXCEPTION( "writerfilter", "StyleSheetTable::getOrCreateCharStyle - Style::setPropertyValue");
}
}
xCharStyles->insertByName( sListLabel, uno::makeAny( xStyle) );
@@ -1637,7 +1637,7 @@ OUString StyleSheetTable::getOrCreateCharStyle( PropertyValueVector_t& rCharProp
}
catch( const uno::Exception& )
{
- OSL_FAIL( "Exception in StyleSheetTable::getOrCreateCharStyle");
+ TOOLS_WARN_EXCEPTION( "writerfilter", "StyleSheetTable::getOrCreateCharStyle");
}
return sListLabel;
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 43eab954b1ea..ebce8634f96c 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -26,6 +26,7 @@
#include <certificateviewer.hxx>
#include <biginteger.hxx>
#include <sax/tools/converter.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -416,7 +417,7 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, AddButtonHdl, weld::Button&, void)
}
catch ( uno::Exception& )
{
- OSL_FAIL( "Exception while adding a signature!" );
+ TOOLS_WARN_EXCEPTION( "xmlsecurity.dialogs", "adding a signature!" );
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_xDialog.get(),
VclMessageType::Error, VclButtonsType::Ok,
XsResId(STR_XMLSECDLG_SIGNING_FAILED)));
@@ -446,7 +447,7 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, RemoveButtonHdl, weld::Button&, void)
}
catch ( uno::Exception& )
{
- OSL_FAIL( "Exception while removing a signature!" );
+ TOOLS_WARN_EXCEPTION( "xmlsecurity.dialogs", "Exception while removing a signature!" );
// Don't keep invalid entries...
ImplGetSignatureInformations(/*bUseTempStream=*/true, /*bCacheLastSignature=*/true);
ImplFillSignaturesBox();