From eaf3c60194e440e8a9bebac46f8d55ba6246001a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 19 Dec 2012 13:52:56 +0100 Subject: fdo#58331: Handle IllegalArgumentException routinely thrown for legacy exts ...that was no longer handled properly when installing such a legacy .zip extension due to 31170413ae3786bf44564e813d7291354e939a77 "API CHANGE: com.sun.star.lang.IllegalArgumentException." Change-Id: I6f5f4be0eed16496d8d3c3623d6676c7c669c5c4 --- desktop/source/deployment/registry/package/dp_package.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'desktop/source') diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 3e5d31c6d348..e2cdfad0b970 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -866,7 +866,7 @@ void BackendImpl::PackageImpl::processPackage_( try { xPackage->registerPackage( startup, xSubAbortChannel, xCmdEnv ); } - catch (const Exception &) + catch (const Exception & e) { //We even try a rollback if the user cancelled the action (CommandAbortedException) //in order to prevent invalid database entries. @@ -1366,9 +1366,15 @@ Reference BackendImpl::PackageImpl::bindBundleItem( ReferencexPackage; try { - xPackage.set( getMyBackend()->m_xRootRegistry->bindPackage( - url, mediaType, bRemoved, identifier, xCmdEnv ) ); - OSL_ASSERT( xPackage.is() ); + try { + xPackage.set( getMyBackend()->m_xRootRegistry->bindPackage( + url, mediaType, bRemoved, identifier, xCmdEnv ) ); + OSL_ASSERT( xPackage.is() ); + } catch (css::lang::IllegalArgumentException & e) { + css::uno::Any exc(cppu::getCaughtException()); + throw css::lang::WrappedTargetException( + "wrapped: " + e.Message, e.Context, exc); + } } catch (const RuntimeException &) { throw; -- cgit v1.2.3