[Libreoffice-commits] .: Branch 'libreoffice-3-6' - connectivity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Dec 3 05:47:34 PST 2012
connectivity/source/drivers/jdbc/JStatement.cxx | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 0a6d705e9dc1bcf225b7bba684e98f29a1781c54
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Sun Dec 2 18:29:18 2012 +0100
Catch all exceptions to respect specification
In particular, getMaxRows() can throw SQLException
Change-Id: I1f49afe8258d98000bff34e18f4d98967c46e1b3
Reviewed-on: https://gerrit.libreoffice.org/1226
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx
index f10dfd3..1d29221 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -39,6 +39,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>
@@ -632,8 +633,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:
@@ -656,6 +659,15 @@ sal_Bool java_sql_Statement_Base::convertFastPropertyValue(
// return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
default:
;
+ }
+ }
+ catch(const ::com::sun::star::lang::IllegalArgumentException&)
+ {
+ throw;
+ }
+ catch(const ::com::sun::star::uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
return sal_False;
}
More information about the Libreoffice-commits
mailing list