diff options
-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)); } } |