diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-12-02 18:29:18 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-12-02 18:34:27 +0100 |
commit | 66e5cf7096a2dc2287f9265087d45c57f1069b9b (patch) | |
tree | 114b80ff357ce3f2a7711a7a4a24c43c050efcdb /connectivity | |
parent | 6174694ee7efe7b94d0bb1987be1c48f1ca25cf5 (diff) |
Catch all exceptions to respect specification
In particular, getMaxRows() can throw SQLException
Change-Id: I1f49afe8258d98000bff34e18f4d98967c46e1b3
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/jdbc/JStatement.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index a7e24bcccb05..0745068bb51e 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -30,6 +30,7 @@ #include <comphelper/sequence.hxx> #include "TConnection.hxx" #include <comphelper/types.hxx> +#include <tools/diagnose_ex.h> #include <com/sun/star/sdbc/ResultSetConcurrency.hpp> #include <com/sun/star/sdbc/ResultSetType.hpp> #include <com/sun/star/sdbc/FetchDirection.hpp> @@ -623,8 +624,10 @@ sal_Bool java_sql_Statement_Base::convertFastPropertyValue( const Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException) { - switch(nHandle) + try { + switch(nHandle) + { case PROPERTY_ID_QUERYTIMEOUT: return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, getQueryTimeOut()); case PROPERTY_ID_MAXFIELDSIZE: @@ -647,6 +650,15 @@ sal_Bool java_sql_Statement_Base::convertFastPropertyValue( // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink); default: ; + } + } + catch(::com::sun::star::lang::IllegalArgumentException) + { + throw; + } + catch(::com::sun::star::uno::Exception) + { + DBG_UNHANDLED_EXCEPTION(); } return sal_False; } |