diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-13 20:35:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-14 09:21:01 +0100 |
commit | b166135056a784be4700b1c1d83975289b7f99ea (patch) | |
tree | 14af1c4e44f02611f604421d173cee99799418ef /package | |
parent | dd9a1bae7c40b9441e640206e2b330a63fa23515 (diff) |
coverity#983698 Uncaught exception
Change-Id: I3f597643c1f743314ca17346901f11dc4f1f7302
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index eb4b75d160d6..22e21d239cd2 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -2587,12 +2587,33 @@ sal_Bool SAL_CALL OWriteStream::hasEncryptionData() ::osl::ResettableMutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() ); if (!m_pImpl) - return sal_False; + return false; + + bool bRet = false; - bool bRet = m_pImpl->IsEncrypted(); + try + { + bRet = m_pImpl->IsEncrypted(); - if (!bRet && m_pImpl->m_bUseCommonEncryption && m_pImpl->m_pParent) - bRet = m_pImpl->m_pParent->m_bHasCommonEncryptionData; + if (!bRet && m_pImpl->m_bUseCommonEncryption && m_pImpl->m_pParent) + bRet = m_pImpl->m_pParent->m_bHasCommonEncryptionData; + } + catch( const uno::RuntimeException& rRuntimeException ) + { + m_pImpl->AddLog( rRuntimeException.Message ); + m_pImpl->AddLog( "Rethrow" ); + throw; + } + catch( const uno::Exception& rException ) + { + m_pImpl->AddLog( rException.Message ); + m_pImpl->AddLog( "Rethrow" ); + + uno::Any aCaught( ::cppu::getCaughtException() ); + throw lang::WrappedTargetRuntimeException( "Problems on hasEncryptionData!", + static_cast< ::cppu::OWeakObject* >( this ), + aCaught ); + } return bRet; } |