summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2019-12-26 09:22:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-26 19:08:42 +0100
commitdf773dc769f6a0d676673ac9b5fc0e8132e435e6 (patch)
treefe744b9d76e5f26282409fbe3b117e24659de7c0 /connectivity
parent32b9d07baa0cf6907f14ccb9aa068b51d95eefaa (diff)
use more TOOLS_WARN_EXCEPTION
so we get more useful log messages when stuff goes wrong Change-Id: Ia55db7ab1a4d79b0f281673fbbb06c61745fa89e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85829 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/conncleanup.cxx13
-rw-r--r--connectivity/source/commontools/dbtools.cxx2
-rw-r--r--connectivity/source/commontools/dbtools2.cxx2
-rw-r--r--connectivity/source/commontools/predicateinput.cxx5
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx6
-rw-r--r--connectivity/source/sdbcx/VIndex.cxx3
6 files changed, 17 insertions, 14 deletions
diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx
index 2f646e0535ce..922551c470af 100644
--- a/connectivity/source/commontools/conncleanup.cxx
+++ b/connectivity/source/commontools/conncleanup.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
namespace dbtools
@@ -55,7 +56,7 @@ namespace dbtools
}
catch( const Exception& )
{
- OSL_FAIL( "OAutoConnectionDisposer::OAutoConnectionDisposer: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::OAutoConnectionDisposer" );
}
}
@@ -69,7 +70,7 @@ namespace dbtools
}
catch( const Exception& )
{
- OSL_FAIL( "OAutoConnectionDisposer::startPropertyListening: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::startPropertyListening" );
}
}
@@ -90,7 +91,7 @@ namespace dbtools
}
catch( const Exception& )
{
- OSL_FAIL( "OAutoConnectionDisposer::stopPropertyListening: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::stopPropertyListening" );
}
}
@@ -105,7 +106,7 @@ namespace dbtools
}
catch( const Exception& )
{
- OSL_FAIL( "OAutoConnectionDisposer::startRowSetListening: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::startRowSetListening" );
}
m_bRSListening = true;
}
@@ -120,7 +121,7 @@ namespace dbtools
}
catch( const Exception& )
{
- OSL_FAIL( "OAutoConnectionDisposer::stopRowSetListening: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OAutoConnectionDisposer::stopRowSetListening" );
}
m_bRSListening = false;
}
@@ -202,7 +203,7 @@ namespace dbtools
}
catch(Exception&)
{
- OSL_FAIL("OAutoConnectionDisposer::clearConnection: caught an exception!");
+ TOOLS_WARN_EXCEPTION("connectivity.commontools", "OAutoConnectionDisposer::clearConnection");
}
}
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 514b026b26c9..0bf66b360378 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1184,7 +1184,7 @@ try
}
catch(const Exception&)
{
- OSL_FAIL( "TransferFormComponentProperties: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "TransferFormComponentProperties" );
}
}
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 46832ede01a3..5986595517fc 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -479,7 +479,7 @@ namespace
}
catch(SQLException&)
{
- OSL_FAIL( "lcl_createSDBCXColumn: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "lcl_createSDBCXColumn" );
}
}
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 3e88af4e5e62..bfe19152f281 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -30,6 +30,7 @@
#include <connectivity/sqlnode.hxx>
#include <connectivity/PColumn.hxx>
#include <comphelper/numbers.hxx>
+#include <tools/diagnose_ex.h>
#include <memory>
@@ -85,7 +86,7 @@ namespace dbtools
}
catch( const Exception& )
{
- OSL_FAIL( "OPredicateInputController::getSeparatorChars: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OPredicateInputController::getSeparatorChars" );
}
return false;
}
@@ -119,7 +120,7 @@ namespace dbtools
}
catch( const Exception& )
{
- OSL_FAIL( "OPredicateInputController::OPredicateInputController: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OPredicateInputController::OPredicateInputController" );
}
}
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 159856a5583b..de64ef4a14ef 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -646,7 +646,7 @@ namespace connectivity
}
catch(Exception&)
{
- OSL_FAIL( "ODriverDelegator::preCommit: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "ODriverDelegator::preCommit" );
}
}
}
@@ -833,7 +833,7 @@ namespace connectivity
}
catch( const Exception& )
{
- OSL_FAIL( "lcl_getSystemLocale: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "lcl_getSystemLocale" );
}
if ( sLocaleString.isEmpty() )
{
@@ -863,7 +863,7 @@ namespace connectivity
}
catch( const Exception& )
{
- OSL_FAIL( "ODriverDelegator::onConnectedNewDatabase: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "ODriverDelegator::onConnectedNewDatabase" );
}
}
diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx
index 4939bb702085..6ea44120307e 100644
--- a/connectivity/source/sdbcx/VIndex.cxx
+++ b/connectivity/source/sdbcx/VIndex.cxx
@@ -26,6 +26,7 @@
#include <connectivity/sdbcx/VCollection.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <TConnection.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::connectivity;
using namespace ::dbtools;
@@ -152,7 +153,7 @@ Reference< css::container::XNameAccess > SAL_CALL OIndex::getColumns( )
}
catch( const Exception& )
{
- OSL_FAIL( "OIndex::getColumns: caught an exception!" );
+ TOOLS_WARN_EXCEPTION( "connectivity.commontools", "OIndex::getColumns" );
}
return m_pColumns.get();