summaryrefslogtreecommitdiff
path: root/connectivity
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 /connectivity
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 'connectivity')
-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
11 files changed, 23 insertions, 18 deletions
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!");
}
}