summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r--connectivity/source/drivers/dbase/DTables.cxx6
-rw-r--r--connectivity/source/drivers/hsqldb/HConnection.cxx3
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx7
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx5
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcolumns.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindexes.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkeys.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_xtables.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_xusers.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_xviews.cxx6
12 files changed, 54 insertions, 15 deletions
diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx
index 90f62bdc526f..056b287aa994 100644
--- a/connectivity/source/drivers/dbase/DTables.cxx
+++ b/connectivity/source/drivers/dbase/DTables.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <dbase/DCatalog.hxx>
#include <comphelper/types.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <strings.hrc>
#include <connectivity/dbexception.hxx>
@@ -85,9 +86,10 @@ sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const R
{
throw;
}
- catch(Exception&)
+ catch(Exception& ex)
{
- throw SQLException();
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw SQLException( ex.Message, nullptr, "", 0, anyEx );
}
}
}
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index cf4cafbe347c..7da46daafb2f 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -231,9 +231,10 @@ namespace connectivity { namespace hsqldb
catch( const RuntimeException& ) { throw; }
catch( const Exception& )
{
+ css::uno::Any anyEx = cppu::getCaughtException();
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceString(STR_NO_TABLE_CONTAINER));
- throw WrappedTargetException( sError ,*this, ::cppu::getCaughtException() );
+ throw WrappedTargetException( sError ,*this, anyEx );
}
SAL_WARN_IF( !xTables.is(), "connectivity.hsqldb", "OHsqlConnection::impl_getTableContainer_throw: post condition not met!" );
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 5fdc586cc038..bfaef457d35e 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <jvmaccess/classpath.hxx>
#include <comphelper/namedvaluecollection.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <rtl/ustrbuf.hxx>
#include <jni.h>
#include <strings.hrc>
@@ -688,15 +689,15 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas
}
}
}
- catch( const SQLException& e )
+ catch( const SQLException& )
{
+ css::uno::Any anyEx = cppu::getCaughtException();
throw SQLException(
lcl_getDriverLoadErrorMessage( getResources(),_sDriverClass, _sDriverClassPath ),
*this,
OUString(),
1000,
- makeAny(e)
- );
+ anyEx);
}
catch( Exception& )
{
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 20edd90d6192..4a9a854d48f7 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -28,6 +28,7 @@
#include <strings.hxx>
#include <comphelper/logging.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <memory>
@@ -222,7 +223,9 @@ void java_lang_Object::ThrowRuntimeException( JNIEnv* _pEnvironment, const Refer
}
catch (const SQLException& e)
{
- throw WrappedTargetRuntimeException(e.Message, e.Context, makeAny(e));
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( e.Message,
+ e.Context, anyEx );
}
}
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
index 707d634044ce..180ded29a0b8 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
@@ -37,11 +37,13 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/implbase.hxx>
#include "pq_xcolumns.hxx"
@@ -331,7 +333,9 @@ void Columns::refresh()
}
catch ( css::sdbc::SQLException & e )
{
- throw RuntimeException( e.Message , e.Context );
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( e.Message,
+ nullptr, anyEx );
}
fire( RefreshedBroadcaster( *this ) );
}
diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
index bab35147b26b..8501d84bea36 100644
--- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
@@ -38,10 +38,12 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include "pq_xcolumns.hxx"
#include "pq_xindexcolumns.hxx"
@@ -147,7 +149,9 @@ void IndexColumns::refresh()
}
catch ( css::sdbc::SQLException & e )
{
- throw RuntimeException( e.Message , e.Context );
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( e.Message,
+ e.Context, anyEx );
}
fire( RefreshedBroadcaster( *this ) );
diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
index 22b8acf7102c..70f35d515cc2 100644
--- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
@@ -37,11 +37,13 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XParameters.hpp>
#include <com/sun/star/sdbc/KeyRule.hpp>
#include <com/sun/star/sdbcx/KeyType.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include "pq_xindexes.hxx"
#include "pq_xindex.hxx"
@@ -180,7 +182,9 @@ void Indexes::refresh()
}
catch ( css::sdbc::SQLException & e )
{
- throw RuntimeException( e.Message , e.Context );
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( e.Message,
+ e.Context, anyEx );
}
fire( RefreshedBroadcaster( *this ) );
diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
index 782861615707..1982d348851c 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
@@ -36,10 +36,12 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include "pq_xcolumns.hxx"
#include "pq_xkeycolumns.hxx"
@@ -149,7 +151,9 @@ void KeyColumns::refresh()
}
catch ( css::sdbc::SQLException & e )
{
- throw RuntimeException( e.Message , e.Context );
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( e.Message,
+ e.Context, anyEx );
}
fire( RefreshedBroadcaster( *this ) );
diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
index 07ee93726a4d..09aa41ea0f15 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
@@ -37,11 +37,13 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XParameters.hpp>
#include <com/sun/star/sdbc/KeyRule.hpp>
#include <com/sun/star/sdbcx/KeyType.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include "pq_xkeys.hxx"
#include "pq_xkey.hxx"
@@ -198,7 +200,9 @@ void Keys::refresh()
}
catch ( css::sdbc::SQLException & e )
{
- throw RuntimeException( e.Message , e.Context );
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( e.Message,
+ e.Context, anyEx );
}
fire( RefreshedBroadcaster( *this ) );
diff --git a/connectivity/source/drivers/postgresql/pq_xtables.cxx b/connectivity/source/drivers/postgresql/pq_xtables.cxx
index 0eb86f12942c..907e777f273d 100644
--- a/connectivity/source/drivers/postgresql/pq_xtables.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xtables.cxx
@@ -36,12 +36,14 @@
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <com/sun/star/sdbcx/KeyType.hpp>
#include <com/sun/star/sdbc/KeyRule.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include "pq_xtables.hxx"
#include "pq_xviews.hxx"
@@ -142,7 +144,9 @@ void Tables::refresh()
}
catch ( const css::sdbc::SQLException & e )
{
- throw RuntimeException( e.Message , e.Context );
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( e.Message,
+ e.Context, anyEx );
}
fire( RefreshedBroadcaster( *this ) );
diff --git a/connectivity/source/drivers/postgresql/pq_xusers.cxx b/connectivity/source/drivers/postgresql/pq_xusers.cxx
index e7d6b6112b5a..cb30c0b50b4c 100644
--- a/connectivity/source/drivers/postgresql/pq_xusers.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xusers.cxx
@@ -36,9 +36,11 @@
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include "pq_xusers.hxx"
#include "pq_xuser.hxx"
@@ -109,7 +111,9 @@ void Users::refresh()
}
catch ( css::sdbc::SQLException & e )
{
- throw RuntimeException( e.Message , e.Context );
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( e.Message,
+ e.Context, anyEx );
}
fire( RefreshedBroadcaster( *this ) );
diff --git a/connectivity/source/drivers/postgresql/pq_xviews.cxx b/connectivity/source/drivers/postgresql/pq_xviews.cxx
index 7b1abf581468..8f1d58d07f8e 100644
--- a/connectivity/source/drivers/postgresql/pq_xviews.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xviews.cxx
@@ -36,8 +36,10 @@
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
+#include <cppuhelper/exc_hlp.hxx>
#include "pq_xviews.hxx"
#include "pq_xview.hxx"
@@ -124,7 +126,9 @@ void Views::refresh()
}
catch ( css::sdbc::SQLException & e )
{
- throw RuntimeException( e.Message , e.Context );
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw css::lang::WrappedTargetRuntimeException( e.Message,
+ e.Context, anyEx );
}
fire( RefreshedBroadcaster( *this ) );
}