diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-21 11:05:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-21 13:59:35 +0100 |
commit | 10e0de4ee69c409d2b33f3819abaefeace7d05dd (patch) | |
tree | 48f218064faeacd2bbea9b7dbf72e137d1fcb788 /svl/source/fsstor | |
parent | 067207f02dff5b499416e9e814919a32145248a2 (diff) |
coverity#707208 Uncaught exception
Change-Id: I7fe87d012acbd7bac9736ee5ff8c6abc0da3d129
Diffstat (limited to 'svl/source/fsstor')
-rw-r--r-- | svl/source/fsstor/fsstorage.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index f354bfc1bebb..37ca676568a1 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -1143,27 +1143,29 @@ sal_Bool SAL_CALL FSStorage::hasElements() if ( !m_pImpl ) throw lang::DisposedException(); - if ( !GetContent() ) - throw io::IOException(); // TODO: error handling - - uno::Sequence< OUString > aProps( 1 ); - aProps[0] = "TargetURL"; - ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; - try { + if ( !GetContent() ) + throw io::IOException(); // TODO: error handling + + uno::Sequence< OUString > aProps( 1 ); + aProps[0] = "TargetURL"; + ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; + uno::Reference< sdbc::XResultSet > xResultSet = GetContent()->createCursor( aProps, eInclude ); return ( xResultSet.is() && xResultSet->next() ); } - catch( uno::Exception& ) + catch (const uno::RuntimeException&) + { + throw; + } + catch (const uno::Exception&) { throw uno::RuntimeException(); } } - // XDisposable - void SAL_CALL FSStorage::dispose() throw ( uno::RuntimeException, std::exception ) { |