From b62e428bd1562414e5421804bedb22761432a5d1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 31 Oct 2014 12:28:19 +0000 Subject: coverity#1158395 Uncaught exception and coverity#1158394 Uncaught exception Change-Id: I73430678c658202475e0073c3c9bde0a072c1ee9 --- connectivity/source/drivers/firebird/Blob.cxx | 56 ++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 5 deletions(-) (limited to 'connectivity/source/drivers/firebird') 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 - #include +#include +#include +#include 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(), 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(), a); + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit