Kaydet (Commit) 2e7702fb authored tarafından Stephan Bergmann's avatar Stephan Bergmann

fdo#51143 Do not wrap CannotActivateFactoryException as DeploymentException

...as some client code catches just the former and thus fails now.  (This was a
regression introduced with the recent cppuhelper/source/defaultbootstrap.cxx.)

Change-Id: I8306797f8331d894ab4e7695478e3824e9f79197
üst b32fcb79
...@@ -872,15 +872,9 @@ void ServiceManager::loadImplementation( ...@@ -872,15 +872,9 @@ void ServiceManager::loadImplementation(
if (!prefix.isEmpty()) { if (!prefix.isEmpty()) {
prefix += "_"; prefix += "_";
} }
try { f0 = cppu::loadSharedLibComponentFactory(
f0 = cppu::loadSharedLibComponentFactory( uri, rtl::OUString(), info->name, this,
uri, rtl::OUString(), info->name, this, css::uno::Reference< css::registry::XRegistryKey >(), prefix);
css::uno::Reference< css::registry::XRegistryKey >(), prefix);
} catch (css::loader::CannotActivateFactoryException & e) {
throw css::uno::DeploymentException(
"Cannot activate implementation " + uri + ": " + e.Message,
static_cast< cppu::OWeakObject * >(this));
}
} else { } else {
SAL_INFO_IF( SAL_INFO_IF(
!info->prefix.isEmpty(), "cppuhelper", !info->prefix.isEmpty(), "cppuhelper",
...@@ -900,15 +894,9 @@ void ServiceManager::loadImplementation( ...@@ -900,15 +894,9 @@ void ServiceManager::loadImplementation(
css::uno::Reference< css::loader::XImplementationLoader > loader( css::uno::Reference< css::loader::XImplementationLoader > loader(
smgr->createInstanceWithContext(info->loader, ctxt), smgr->createInstanceWithContext(info->loader, ctxt),
css::uno::UNO_QUERY_THROW); css::uno::UNO_QUERY_THROW);
try { f0 = loader->activate(
f0 = loader->activate( info->name, rtl::OUString(), uri,
info->name, rtl::OUString(), uri, css::uno::Reference< css::registry::XRegistryKey >());
css::uno::Reference< css::registry::XRegistryKey >());
} catch (css::loader::CannotActivateFactoryException & e) {
throw css::uno::DeploymentException(
"Cannot activate implementation " + uri + ": " + e.Message,
static_cast< cppu::OWeakObject * >(this));
}
} }
factory1->set(f0, css::uno::UNO_QUERY); factory1->set(f0, css::uno::UNO_QUERY);
if (!factory1->is()) { if (!factory1->is()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment