diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-27 13:41:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-27 14:34:22 +0000 |
commit | 0095bccdf5e31de6ec6d1a3d83cc31efc8c1daae (patch) | |
tree | 13657c0572cd6808ef06a0c90a1e8f597ce38d2e /connectivity/source/drivers/jdbc | |
parent | 8fbbb94a3914223de1f690090e86a1ec9fbdaa30 (diff) |
coverity#706321 Uncaught exception
Change-Id: Ie3b66520ab0c859272a4b0291f6c907e7fce61e5
Diffstat (limited to 'connectivity/source/drivers/jdbc')
-rw-r--r-- | connectivity/source/drivers/jdbc/Object.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx index 24058cf67d1d..5c020983431d 100644 --- a/connectivity/source/drivers/jdbc/Object.cxx +++ b/connectivity/source/drivers/jdbc/Object.cxx @@ -219,10 +219,13 @@ void java_lang_Object::ThrowSQLException( JNIEnv* _pEnvironment, const Reference void java_lang_Object::ThrowRuntimeException( JNIEnv* _pEnvironment, const Reference< XInterface>& _rxContext ) { - SQLException aException; - if ( lcl_translateJNIExceptionToUNOException( _pEnvironment, _rxContext, aException ) ) + try + { + ThrowSQLException(_pEnvironment, _rxContext); + } + catch (const SQLException& e) { - throw WrappedTargetRuntimeException(aException.Message, aException.Context, makeAny(aException)); + throw WrappedTargetRuntimeException(e.Message, e.Context, makeAny(e)); } } |