From 6175ccdad147cd6ef7143c03e30c0f2835d9a15d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 30 Oct 2014 09:52:28 +0000 Subject: coverity#706582 Uncaught exception Change-Id: I82fad3f152fe5a563675686accedb583d07d2b13 --- package/source/zippackage/ZipPackage.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'package') 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 ); -- cgit