summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-11-04 16:33:15 +0100
committerDavid Tardon <dtardon@redhat.com>2014-11-04 19:52:49 +0100
commit2a91eea8ae3c60f8193c6c3a61682c312077f915 (patch)
treefe90351a0f1520b433d0281454202e4906a813e6 /connectivity
parenta16fcc537312e16677de988f7b4ba433943b469f (diff)
coverity#706361 uncaught exception
Change-Id: Iee569c32569339ec2eeb6ef038e5bdc83e541a8f
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaData.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
index 56a246745cd6..9c556fa24c97 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
@@ -1243,12 +1243,16 @@ OUString SAL_CALL ODatabaseMetaData::getSchemaTerm( ) throw(SQLException, Runti
return aValue;
}
-sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException, std::exception)
+sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException, std::exception) try
{
OUString aValue;
OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_VER,aValue,*this,m_pConnection->getTextEncoding());
return aValue.copy(0,aValue.indexOf('.')).toInt32();
}
+catch (const SQLException &)
+{
+ return 0;
+}
sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException, std::exception)
{