diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-28 21:03:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-28 21:03:30 +0100 |
commit | 30dfabb68e868788f64802afd673f351145f71a4 (patch) | |
tree | d9309ab71aa2814be6f8f3b696fbbe15ad64c9c6 /connectivity | |
parent | 17c6c005fb060520d71ad77cd2311a14bf223d94 (diff) |
coverity#1308559 Uncaught exception
Change-Id: Ic133aa4f3709b199529d3940369c990e3357ff87
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/odbc/OConnection.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/inc/odbc/OConnection.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx index 59c969a94314..2b2589e7f34a 100644 --- a/connectivity/source/drivers/odbc/OConnection.cxx +++ b/connectivity/source/drivers/odbc/OConnection.cxx @@ -177,7 +177,7 @@ SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr, sal_Int32 nTi return nSQLRETURN; } -SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyValue >& info) throw(SQLException) +SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyValue >& info) throw(SQLException, std::exception) { m_aConnectionHandle = SQL_NULL_HANDLE; m_sURL = url; @@ -188,7 +188,7 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal throw SQLException(); sal_Int32 nLen = url.indexOf(':'); - nLen = url.indexOf(':',nLen+1); + nLen = url.indexOf(':',nLen+2); OUString aDSN("DSN="), aUID, aPWD, aSysDrvSettings; aDSN += url.copy(nLen+1); diff --git a/connectivity/source/inc/odbc/OConnection.hxx b/connectivity/source/inc/odbc/OConnection.hxx index 1c5fe4030d4e..8dfb0627efc8 100644 --- a/connectivity/source/inc/odbc/OConnection.hxx +++ b/connectivity/source/inc/odbc/OConnection.hxx @@ -85,7 +85,7 @@ namespace connectivity public: oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const; - SQLRETURN Construct( const OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(::com::sun::star::sdbc::SQLException); + SQLRETURN Construct( const OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(::com::sun::star::sdbc::SQLException, std::exception); OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver); // OConnection(const SQLHANDLE _pConnectionHandle); |