diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 12:28:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 12:54:43 +0000 |
commit | e57ca02849c3d87142ff5ff9099a212e72b8139c (patch) | |
tree | bcce66b27261553c308779f3e8663a269ed3a671 /connectivity/source/drivers/firebird/Connection.cxx | |
parent | 8802ebd5172ec4bc412a59d136c82b77ab452281 (diff) |
Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.
Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly). The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually). There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).
Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code. Missing @throws
documentation has not been applied in such manual clean-up.
Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/drivers/firebird/Connection.cxx')
-rw-r--r-- | connectivity/source/drivers/firebird/Connection.cxx | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx index 54ee5efdd7c9..7c39219943ee 100644 --- a/connectivity/source/drivers/firebird/Connection.cxx +++ b/connectivity/source/drivers/firebird/Connection.cxx @@ -145,7 +145,6 @@ struct ConnectionGuard }; void Connection::construct(const ::rtl::OUString& url, const Sequence< PropertyValue >& info) - throw (SQLException, RuntimeException, std::exception) { ConnectionGuard aGuard(m_refCount); @@ -360,7 +359,6 @@ IMPLEMENT_SERVICE_INFO(Connection, "com.sun.star.sdbc.drivers.firebird.Connectio "com.sun.star.sdbc.Connection") Reference< XBlob> Connection::createBlob(ISC_QUAD* pBlobId) - throw(SQLException, RuntimeException) { MutexGuard aGuard(m_aMutex); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -374,7 +372,6 @@ Reference< XBlob> Connection::createBlob(ISC_QUAD* pBlobId) } Reference< XClob> Connection::createClob(ISC_QUAD* pBlobId) - throw(SQLException, RuntimeException) { MutexGuard aGuard(m_aMutex); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -390,7 +387,6 @@ Reference< XClob> Connection::createClob(ISC_QUAD* pBlobId) //----- XConnection ---------------------------------------------------------- Reference< XStatement > SAL_CALL Connection::createStatement( ) - throw(SQLException, RuntimeException, std::exception) { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -432,7 +428,6 @@ OUString Connection::transformPreparedStatement(const OUString& _sSQL) Reference< XPreparedStatement > SAL_CALL Connection::prepareStatement( const OUString& _sSql) - throw(SQLException, RuntimeException, std::exception) { SAL_INFO("connectivity.firebird", "prepareStatement() " "called with sql: " << _sSql); @@ -452,7 +447,7 @@ Reference< XPreparedStatement > SAL_CALL Connection::prepareStatement( } Reference< XPreparedStatement > SAL_CALL Connection::prepareCall( - const OUString& _sSql ) throw(SQLException, RuntimeException, std::exception) + const OUString& _sSql ) { SAL_INFO("connectivity.firebird", "prepareCall(). " "_sSql: " << _sSql); @@ -467,7 +462,6 @@ Reference< XPreparedStatement > SAL_CALL Connection::prepareCall( } OUString SAL_CALL Connection::nativeSQL( const OUString& _sSql ) - throw(SQLException, RuntimeException, std::exception) { MutexGuard aGuard( m_aMutex ); // We do not need to adapt the SQL for Firebird atm. @@ -475,7 +469,6 @@ OUString SAL_CALL Connection::nativeSQL( const OUString& _sSql ) } void SAL_CALL Connection::setAutoCommit( sal_Bool autoCommit ) - throw(SQLException, RuntimeException, std::exception) { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -488,7 +481,7 @@ void SAL_CALL Connection::setAutoCommit( sal_Bool autoCommit ) } } -sal_Bool SAL_CALL Connection::getAutoCommit() throw(SQLException, RuntimeException, std::exception) +sal_Bool SAL_CALL Connection::getAutoCommit() { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -497,7 +490,6 @@ sal_Bool SAL_CALL Connection::getAutoCommit() throw(SQLException, RuntimeExcepti } void Connection::setupTransaction() - throw (SQLException) { MutexGuard aGuard( m_aMutex ); ISC_STATUS status_vector[20]; @@ -555,7 +547,6 @@ void Connection::setupTransaction() } isc_tr_handle& Connection::getTransaction() - throw (SQLException) { MutexGuard aGuard( m_aMutex ); if (!m_aTransactionHandle) @@ -565,7 +556,7 @@ isc_tr_handle& Connection::getTransaction() return m_aTransactionHandle; } -void SAL_CALL Connection::commit() throw(SQLException, RuntimeException, std::exception) +void SAL_CALL Connection::commit() { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -720,7 +711,7 @@ void Connection::runBackupService(const short nAction) } -void SAL_CALL Connection::rollback() throw(SQLException, RuntimeException, std::exception) +void SAL_CALL Connection::rollback() { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -733,7 +724,7 @@ void SAL_CALL Connection::rollback() throw(SQLException, RuntimeException, std:: } } -sal_Bool SAL_CALL Connection::isClosed( ) throw(SQLException, RuntimeException, std::exception) +sal_Bool SAL_CALL Connection::isClosed( ) { MutexGuard aGuard( m_aMutex ); @@ -741,7 +732,7 @@ sal_Bool SAL_CALL Connection::isClosed( ) throw(SQLException, RuntimeException, return Connection_BASE::rBHelper.bDisposed; } -Reference< XDatabaseMetaData > SAL_CALL Connection::getMetaData( ) throw(SQLException, RuntimeException, std::exception) +Reference< XDatabaseMetaData > SAL_CALL Connection::getMetaData( ) { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -759,7 +750,6 @@ Reference< XDatabaseMetaData > SAL_CALL Connection::getMetaData( ) throw(SQLExc } void SAL_CALL Connection::setReadOnly(sal_Bool readOnly) - throw(SQLException, RuntimeException, std::exception) { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -768,7 +758,7 @@ void SAL_CALL Connection::setReadOnly(sal_Bool readOnly) setupTransaction(); } -sal_Bool SAL_CALL Connection::isReadOnly() throw(SQLException, RuntimeException, std::exception) +sal_Bool SAL_CALL Connection::isReadOnly() { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -777,19 +767,17 @@ sal_Bool SAL_CALL Connection::isReadOnly() throw(SQLException, RuntimeException, } void SAL_CALL Connection::setCatalog(const OUString& /*catalog*/) - throw(SQLException, RuntimeException, std::exception) { ::dbtools::throwFunctionNotSupportedSQLException("setCatalog", *this); } OUString SAL_CALL Connection::getCatalog() - throw(SQLException, RuntimeException, std::exception) { ::dbtools::throwFunctionNotSupportedSQLException("getCatalog", *this); return OUString(); } -void SAL_CALL Connection::setTransactionIsolation( sal_Int32 level ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL Connection::setTransactionIsolation( sal_Int32 level ) { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -798,7 +786,7 @@ void SAL_CALL Connection::setTransactionIsolation( sal_Int32 level ) throw(SQLEx setupTransaction(); } -sal_Int32 SAL_CALL Connection::getTransactionIsolation( ) throw(SQLException, RuntimeException, std::exception) +sal_Int32 SAL_CALL Connection::getTransactionIsolation( ) { MutexGuard aGuard( m_aMutex ); checkDisposed(Connection_BASE::rBHelper.bDisposed); @@ -806,21 +794,20 @@ sal_Int32 SAL_CALL Connection::getTransactionIsolation( ) throw(SQLException, R return m_aTransactionIsolation; } -Reference< XNameAccess > SAL_CALL Connection::getTypeMap() throw(SQLException, RuntimeException, std::exception) +Reference< XNameAccess > SAL_CALL Connection::getTypeMap() { ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::getTypeMap", *this ); return nullptr; } void SAL_CALL Connection::setTypeMap(const Reference< XNameAccess >& typeMap) - throw(SQLException, RuntimeException, std::exception) { ::dbtools::throwFeatureNotImplementedSQLException( "XConnection::setTypeMap", *this ); (void) typeMap; } //----- XCloseable ----------------------------------------------------------- -void SAL_CALL Connection::close( ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL Connection::close( ) { // we just dispose us { @@ -832,20 +819,19 @@ void SAL_CALL Connection::close( ) throw(SQLException, RuntimeException, std::e } // XWarningsSupplier -Any SAL_CALL Connection::getWarnings( ) throw(SQLException, RuntimeException, std::exception) +Any SAL_CALL Connection::getWarnings( ) { // when you collected some warnings -> return it return Any(); } -void SAL_CALL Connection::clearWarnings( ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL Connection::clearWarnings( ) { // you should clear your collected warnings here } // XDocumentEventListener void SAL_CALL Connection::documentEventOccured( const DocumentEvent& Event ) - throw(RuntimeException, std::exception) { MutexGuard aGuard(m_aMutex); @@ -899,14 +885,13 @@ void SAL_CALL Connection::documentEventOccured( const DocumentEvent& Event ) } // XEventListener void SAL_CALL Connection::disposing(const EventObject& /*rSource*/) - throw (RuntimeException, std::exception) { MutexGuard aGuard( m_aMutex ); m_xEmbeddedStorage.clear(); } -void Connection::buildTypeInfo() throw( SQLException) +void Connection::buildTypeInfo() { MutexGuard aGuard( m_aMutex ); |