diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-14 10:02:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-14 12:02:46 +0000 |
commit | 584d4f5dcd68f94df42cd78d06c55fd773eb3ca7 (patch) | |
tree | f12f3416ae108ee2e5d50a6a5251435439877ecc | |
parent | 6abcd7fe9bf7fd3b4a1d68b1480f61e6d3651fd0 (diff) |
coverity#1158396 Uncaught exception
Change-Id: I6752a534bca8f81627cdd616ac0f2268824299e0
-rw-r--r-- | connectivity/source/drivers/firebird/Blob.cxx | 31 |
1 files 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<css::uno::XInterface>(), a); + } // Ensure we have enough space for the amount of data we can actually read. const sal_Int64 nBytesAvailable = m_nBlobLength - m_nBlobPosition; |