diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-30 09:52:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-30 09:52:28 +0000 |
commit | 6175ccdad147cd6ef7143c03e30c0f2835d9a15d (patch) | |
tree | 97f5a7d2dd66fbec4dfabcc1eb4acd250374e859 /package | |
parent | 125727c94f4970b697ef4d94b8a6e0a67135e73e (diff) |
coverity#706582 Uncaught exception
Change-Id: I82fad3f152fe5a563675686accedb583d07d2b13
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 92e34a108b69..d210d457602f 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -1362,8 +1362,16 @@ void SAL_CALL ZipPackage::commitChanges() } // first the writeTempFile is called, if it returns a stream the stream should be written to the target // if no stream was returned, the file was written directly, nothing should be done - - uno::Reference< io::XInputStream > xTempInStream = writeTempFile(); + uno::Reference< io::XInputStream > xTempInStream; + try + { + xTempInStream = writeTempFile(); + } + catch (const ucb::ContentCreationException& r) + { + throw WrappedTargetException(THROW_WHERE "Temporary file should be createable!", + static_cast < OWeakObject * > ( this ), makeAny ( r ) ); + } if ( xTempInStream.is() ) { uno::Reference< io::XSeekable > xTempSeek( xTempInStream, uno::UNO_QUERY_THROW ); |