Kaydet (Commit) 0317d53f authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#707209 Uncaught exception

Change-Id: I876e25678d68cba09099776bf303a6540761d2ed
üst 10e0de4e
......@@ -1034,18 +1034,18 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames()
if ( !m_pImpl )
throw lang::DisposedException();
if ( !GetContent() )
throw io::IOException(); // TODO: error handling
uno::Sequence< OUString > aProps( 1 );
aProps[0] = "Title";
::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS;
uno::Sequence< OUString > aResult;
sal_Int32 nSize = 0;
try
{
if ( !GetContent() )
throw io::IOException(); // TODO: error handling
uno::Sequence< OUString > aProps( 1 );
aProps[0] = "Title";
::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS;
sal_Int32 nSize = 0;
uno::Reference< sdbc::XResultSet > xResultSet = GetContent()->createCursor( aProps, eInclude );
uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY );
......@@ -1072,11 +1072,11 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames()
aCaught );
}
}
catch( uno::RuntimeException& )
catch (const uno::RuntimeException&)
{
throw;
}
catch ( uno::Exception& )
catch (const uno::Exception&)
{
uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetRuntimeException( "Can not open storage!",
......@@ -1087,7 +1087,6 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames()
return aResult;
}
sal_Bool SAL_CALL FSStorage::hasByName( const OUString& aName )
throw ( uno::RuntimeException, std::exception )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment