From 246cd66af254687628b7cbd5aa64cb9bfa87f28d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 11 Oct 2014 21:10:23 +0100 Subject: coverity#706421 Uncaught exception Change-Id: I91a6ac9d9bda0ea25f1f5385bbac71ea9d22d573 --- dbaccess/source/core/dataaccess/databasedocument.cxx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'dbaccess') 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 ); } -- cgit