diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-31 12:28:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-31 13:04:15 +0000 |
commit | b62e428bd1562414e5421804bedb22761432a5d1 (patch) | |
tree | 32bf880d04e8409283559e08b59067aa0f70468a /connectivity/source/drivers/firebird | |
parent | 0b32d9dcb86d3b5cc55c24634b39d29980f873a7 (diff) |
coverity#1158395 Uncaught exception
and
coverity#1158394 Uncaught exception
Change-Id: I73430678c658202475e0073c3c9bde0a072c1ee9
Diffstat (limited to 'connectivity/source/drivers/firebird')
-rw-r--r-- | connectivity/source/drivers/firebird/Blob.cxx | 56 |
1 files changed, 51 insertions, 5 deletions
diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx index 44cd33e58e79..a531dfc18105 100644 --- a/connectivity/source/drivers/firebird/Blob.cxx +++ b/connectivity/source/drivers/firebird/Blob.cxx @@ -11,9 +11,10 @@ #include "Connection.hxx" #include "Util.hxx" -#include <connectivity/dbexception.hxx> - #include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> +#include <connectivity/dbexception.hxx> +#include <cppuhelper/exc_hlp.hxx> using namespace ::connectivity::firebird; @@ -247,8 +248,31 @@ sal_Int32 SAL_CALL Blob::available() throw (NotConnectedException, IOException, RuntimeException, std::exception) { MutexGuard aGuard(m_aMutex); - checkDisposed(Blob_BASE::rBHelper.bDisposed); - ensureBlobIsOpened(); + + try + { + checkDisposed(Blob_BASE::rBHelper.bDisposed); + ensureBlobIsOpened(); + } + catch (const NotConnectedException&) + { + throw; + } + catch (const IOException&) + { + throw; + } + catch (const RuntimeException&) + { + throw; + } + catch (const Exception& e) + { + css::uno::Any a(cppu::getCaughtException()); + throw css::lang::WrappedTargetRuntimeException( + "wrapped Exception " + e.Message, + css::uno::Reference<css::uno::XInterface>(), a); + } return m_nBlobLength - m_nBlobPosition; } @@ -256,7 +280,29 @@ sal_Int32 SAL_CALL Blob::available() void SAL_CALL Blob::closeInput() throw(NotConnectedException, IOException, RuntimeException, std::exception) { - closeBlob(); + try + { + closeBlob(); + } + catch (const NotConnectedException&) + { + throw; + } + catch (const IOException&) + { + throw; + } + catch (const RuntimeException&) + { + throw; + } + catch (const Exception& e) + { + css::uno::Any a(cppu::getCaughtException()); + throw css::lang::WrappedTargetRuntimeException( + "wrapped Exception " + e.Message, + css::uno::Reference<css::uno::XInterface>(), a); + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |