diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-19 09:57:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-19 10:26:52 +0100 |
commit | 71293087a5121c5553e6e95bb8da2ec954e22e55 (patch) | |
tree | 118fd4b9de99082be482687319fe337961a59fde | |
parent | bf89444ca8e7a544056a2162fc48dae43b05f9d2 (diff) |
coverity#707363 Uncaught exception
Change-Id: I0c61a0176bb108e8e42c56e6cdbfa342ffe2512f
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index be1cfe601182..ec2afb55867a 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -245,10 +245,18 @@ sal_uLong Writer::Write( SwPaM& rPaM, SvStream& rStrm, const OUString* pFName ) { if ( IsStgWriter() ) { - SotStorageRef aRef = new SotStorage( rStrm ); - sal_uLong nResult = Write( rPaM, *aRef, pFName ); - if ( nResult == ERRCODE_NONE ) - aRef->Commit(); + sal_uLong nResult = ERRCODE_ABORT; + try + { + SotStorageRef aRef = new SotStorage( rStrm ); + nResult = Write( rPaM, *aRef, pFName ); + if ( nResult == ERRCODE_NONE ) + aRef->Commit(); + } + catch (const css::ucb::ContentCreationException &e) + { + SAL_WARN("sw", "SmFilterDetect::detect caught " << e.Message); + } return nResult; } |