summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-05 15:48:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-06 08:16:38 +0100
commit20c4c3acd5fbf38f2e990435bf346d4fbac05f9d (patch)
tree64aff89ac6aaf94f99fa99bc7e096eb52736deef /dbaccess
parentdcc06dee258e04eff0140901d6e2e783ec3e2dd8 (diff)
store originating exception when re-throwing
Change-Id: I26959d3604a581f1528e575239970ab364c7fd50 Reviewed-on: https://gerrit.libreoffice.org/67413 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSet.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 349d70716b7b..f390467422f2 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -2214,7 +2214,7 @@ Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionH
Any aError = ::cppu::getCaughtException();
OUString sMessage = ResourceManager::loadString( RID_NO_SUCH_DATA_SOURCE,
"$name$", m_aDataSourceName, "$error$", extractExceptionMessage( m_aContext, aError ) );
- ::dbtools::throwGenericSQLException( sMessage, *this );
+ ::dbtools::throwGenericSQLException( sMessage, *this, aError );
}
}
setActiveConnection(xNewConn);
@@ -2574,9 +2574,10 @@ void SAL_CALL ORowSet::setBinaryStream( sal_Int32 parameterIndex, const Referenc
m_bParametersDirty = true;
x->closeInput();
}
- catch( Exception& )
+ catch( Exception const & )
{
- throw SQLException();
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw SQLException("ORowSet::setBinaryStream", *this, "S1000", 0,anyEx);
}
}
@@ -2597,9 +2598,10 @@ void SAL_CALL ORowSet::setCharacterStream( sal_Int32 parameterIndex, const Refer
rParamValue.setTypeKind( DataType::LONGVARCHAR );
x->closeInput();
}
- catch( Exception& )
+ catch( Exception const & )
{
- throw SQLException();
+ css::uno::Any anyEx = cppu::getCaughtException();
+ throw SQLException("ORowSet::setCharacterStream", *this, "S1000", 0, anyEx);
}
}