summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-21 11:03:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-21 13:59:35 +0100
commit067207f02dff5b499416e9e814919a32145248a2 (patch)
tree9cffa58c0d12596b7072fdce6e3615cad25bcf76 /sot
parentd29fd56e21cc3f6ba5fba7af788e39f0a7bec00d (diff)
coverity#707195 Uncaught exception
Change-Id: Idaeb36f01632cc91cc9fc3d5febd249e39e44ae2
Diffstat (limited to 'sot')
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 1e8ba5027f9e..15d9d46e781c 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -457,7 +457,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
BaseStorage* pStrg = m_pStorage->OpenStorage( aName );
m_pStorage->ResetError();
if ( !pStrg )
- throw io::IOException();
+ throw lang::WrappedTargetException(); // io::IOException(); // TODO
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( xTempFile, false ); // do not close the original stream
if ( !pStream )
@@ -489,15 +489,15 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
else
{
BaseStorageStream* pStream = m_pStorage->OpenStream( aName, STREAM_READ | STREAM_SHARE_DENYALL | STREAM_NOCREATE );
- if ( !pStream || pStream->GetError() || m_pStorage->GetError() )
- {
- m_pStorage->ResetError();
- DELETEZ( pStream );
- throw io::IOException(); // TODO
- }
-
try
{
+ if ( !pStream || pStream->GetError() || m_pStorage->GetError() )
+ {
+ m_pStorage->ResetError();
+ DELETEZ( pStream );
+ throw io::IOException(); // TODO
+ }
+
uno::Sequence< sal_Int8 > aData( nBytesCount );
sal_Int32 nSize = nBytesCount;
sal_Int32 nRead = 0;
@@ -518,12 +518,12 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
xOutputStream->closeOutput();
xSeekable->seek( 0 );
}
- catch( uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
DELETEZ( pStream );
throw;
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
DELETEZ( pStream );
throw lang::WrappedTargetException(); // TODO: