From 584d4f5dcd68f94df42cd78d06c55fd773eb3ca7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 14 Nov 2014 10:02:52 +0000 Subject: coverity#1158396 Uncaught exception Change-Id: I6752a534bca8f81627cdd616ac0f2268824299e0 --- connectivity/source/drivers/firebird/Blob.cxx | 31 +++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx index a531dfc18105..18f684a46d53 100644 --- a/connectivity/source/drivers/firebird/Blob.cxx +++ b/connectivity/source/drivers/firebird/Blob.cxx @@ -191,8 +191,35 @@ sal_Int32 SAL_CALL Blob::readBytes(uno::Sequence< sal_Int8 >& rDataOut, throw (NotConnectedException, BufferSizeExceededException, 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 BufferSizeExceededException&) + { + 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); + } // Ensure we have enough space for the amount of data we can actually read. const sal_Int64 nBytesAvailable = m_nBlobLength - m_nBlobPosition; -- cgit