From 10e0de4ee69c409d2b33f3819abaefeace7d05dd Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 21 Jul 2014 11:05:45 +0100 Subject: coverity#707208 Uncaught exception Change-Id: I7fe87d012acbd7bac9736ee5ff8c6abc0da3d129 --- svl/source/fsstor/fsstorage.cxx | 22 ++++++++++++---------- 1 file 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 ) { -- cgit