summaryrefslogtreecommitdiff
path: root/package/source
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-07-05 13:55:31 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2024-07-05 16:13:17 +0200
commitc409c83d777fdb6291c7cd03186b69fe4e7fd902 (patch)
tree791595e973d0155cf45ada1ad469e24733dace31 /package/source
parent958cabd2e933ec85caf6eca4f0aacee77195fe7a (diff)
package: avoid throwing RuntimeException in getZipFileContents()
Translate it to ZipIOException. Change-Id: I7a07a59c0ba301b92f31696355c73ccbdf119ff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170013 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'package/source')
-rw-r--r--package/source/zippackage/ZipPackage.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 907ed1b4112e..2cb267734b9f 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -626,7 +626,11 @@ void ZipPackage::getZipFileContents()
if ( !pCurrent->hasByName( sTemp ) )
{
rtl::Reference<ZipPackageFolder> pPkgFolder = new ZipPackageFolder(m_xContext, m_nFormat, m_bAllowRemoveOnInsert);
- pPkgFolder->setName( sTemp );
+ try {
+ pPkgFolder->setName( sTemp );
+ } catch (uno::RuntimeException const& e) {
+ throw css::packages::zip::ZipIOException(e.Message);
+ }
pPkgFolder->doSetParent( pCurrent );
pCurrent = pPkgFolder.get();
}