diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-06 17:11:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-06 21:06:06 +0100 |
commit | 82a30a456e08a27267c35c3df0c6ecd8b9079611 (patch) | |
tree | e0cc74cabdcb9d26e31547eac5b0a25f0c0baeee /package | |
parent | f46e392050a949c2d573b768eeb70d94fff550c2 (diff) |
fix unhandled exception terminate on ooo48061-1.sxw
Change-Id: Ibacb94e719f42faa87ece48051ed8f72c3c78d02
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zippackage/zipfileaccess.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx index acb006336a99..a660d3ed7a48 100644 --- a/package/source/zippackage/zipfileaccess.cxx +++ b/package/source/zippackage/zipfileaccess.cxx @@ -244,10 +244,20 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName ) if ( aIter == m_pZipFile->GetEntryHash().end() ) throw container::NoSuchElementException(THROW_WHERE ); - uno::Reference< io::XInputStream > xEntryStream( m_pZipFile->getDataStream( (*aIter).second, - ::rtl::Reference< EncryptionData >(), - false, - m_aMutexHolder ) ); + uno::Reference< io::XInputStream > xEntryStream; + try + { + xEntryStream = m_pZipFile->getDataStream((*aIter).second, + ::rtl::Reference< EncryptionData >(), + false, + m_aMutexHolder); + } + catch (const io::IOException& e) + { + throw lang::WrappedTargetException( "This package is unusable!", + static_cast < OWeakObject * > ( this ), + makeAny(e)); + } if ( !xEntryStream.is() ) throw uno::RuntimeException(THROW_WHERE ); |