summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-11 21:10:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-12 16:39:56 +0100
commit246cd66af254687628b7cbd5aa64cb9bfa87f28d (patch)
tree0cf65d56650a94d786b2cb5d8d0bedfb17216ebd /dbaccess
parente7d3f4b704c42a9035891700cf57f35aeca2aec7 (diff)
coverity#706421 Uncaught exception
Change-Id: I91a6ac9d9bda0ea25f1f5385bbac71ea9d22d573
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 45199e97e27e..c520f92b60f9 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1088,6 +1088,18 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph
if ( bIsInitializationProcess )
impl_setInitialized();
}
+ catch( const IOException& )
+ {
+ if ( !bIsInitializationProcess )
+ m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveFailed" : "OnSaveAsFailed", NULL, makeAny( _rURL ) );
+ throw;
+ }
+ catch( const RuntimeException& )
+ {
+ if ( !bIsInitializationProcess )
+ m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveFailed" : "OnSaveAsFailed", NULL, makeAny( _rURL ) );
+ throw;
+ }
catch( const Exception& )
{
Any aError = ::cppu::getCaughtException();
@@ -1096,14 +1108,6 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph
if ( !bIsInitializationProcess )
m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveFailed" : "OnSaveAsFailed", NULL, makeAny( _rURL ) );
- if ( aError.isExtractableTo( ::cppu::UnoType< IOException >::get() )
- || aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() )
- )
- {
- // allowed to leave
- throw;
- }
-
impl_throwIOExceptionCausedBySave_throw( aError, _rURL );
}