summaryrefslogtreecommitdiff
path: root/sw
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 /sw
parent102fdc08b86599b9e538d2f38df865d56b3ec63d (diff)
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>
Diffstat (limited to 'sw')
-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
13 files changed, 36 insertions, 23 deletions
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 ...
}