summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-30 14:19:29 +0200
committerAndras Timar <andras.timar@collabora.com>2021-03-31 10:28:06 +0200
commit54bfbdc2ffb8938dbef5febe50c22e4eaf4b3c03 (patch)
tree11c99039401b885c8809b7ffff8ffeebf9781cb9 /dbaccess
parent09deac70e486ca609a25a817cdbea754eb7c5649 (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 'dbaccess')
-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
13 files changed, 25 insertions, 18 deletions
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 61800a5ab194..4bf8a063afed 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 0e52b87baf95..de600099cc7b 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 f5c909600f54..65b30505fbfc 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 22e17c01ec36..4d12925c2205 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;
}