summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-21 11:08:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-21 13:59:35 +0100
commit8f199a3f0bcc5c1600ce5562605475c9e6b3def1 (patch)
tree0463a54358ade9824b801010df0c0257672ca19e /svl
parent0317d53f7c9ae73846c03bd38d46049cdf774c4f (diff)
coverity#707210 Uncaught exception
Change-Id: I63013222988735f901b37584345b79659f69ad8a
Diffstat (limited to 'svl')
-rw-r--r--svl/source/fsstor/fsstorage.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 1cf6403042a2..b2eb88f2a93c 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -979,18 +979,19 @@ uno::Any SAL_CALL FSStorage::getByName( const OUString& aName )
if ( !m_pImpl )
throw lang::DisposedException();
- if ( !GetContent() )
- throw io::IOException(); // TODO: error handling
-
if ( aName.isEmpty() )
throw lang::IllegalArgumentException();
- INetURLObject aURL( m_pImpl->m_aURL );
- aURL.Append( aName );
-
uno::Any aResult;
try
{
+ if ( !GetContent() )
+ throw io::IOException(); // TODO: error handling
+
+ INetURLObject aURL( m_pImpl->m_aURL );
+ aURL.Append( aName );
+
+
if ( ::utl::UCBContentHelper::IsFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
{
aResult <<= openStorageElement( aName, embed::ElementModes::READ );
@@ -1002,21 +1003,21 @@ uno::Any SAL_CALL FSStorage::getByName( const OUString& aName )
else
throw container::NoSuchElementException(); // TODO:
}
- catch( container::NoSuchElementException& )
+ catch (const container::NoSuchElementException&)
{
throw;
}
- catch( lang::WrappedTargetException& )
+ catch (const lang::WrappedTargetException&)
{
throw;
}
- catch( uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
throw;
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetException( "Can not open element!",
static_cast< OWeakObject* >( this ),
aCaught );