summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2013-02-15 12:28:08 +0000
committerOliver-Rainer Wittmann <orw@apache.org>2013-02-15 12:28:08 +0000
commit8f11dce72e639e169146693b58413307de5c2bdf (patch)
treecc9b4f9173ea573b40734dbc97081f5b43e42537 /desktop
parentb3c966abd64fc70129b9ae254603e5626e024819 (diff)
#121625# - method <ExtensionManager::getExtensionsWithSameId(..)> - catch certain exceptions to avoid crashes
- method <ExtensionManager::getAllExtensions(..)> - do not add bundled extensions twice to the map; the map can not hold a fourth entry.
Notes
Notes: reject: shouldnt happen for us
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx40
1 files changed, 36 insertions, 4 deletions
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index fbf25985e1b1..c5d7c1c4b224 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -313,26 +313,59 @@ void ExtensionManager::addExtensionsToMap(
{ //will throw an exception if the extension does not exist
extensionList.push_back(getUserRepository()->getDeployedPackage(
identifier, fileName, Reference<ucb::XCommandEnvironment>()));
- } catch(lang::IllegalArgumentException &)
+ }
+ catch(lang::IllegalArgumentException &)
+ {
+ extensionList.push_back(Reference<deploy::XPackage>());
+ }
+ // catch deploy::DeploymentException and ucb::CommandFailedException to avoid unhandled exceptions causing crashes
+ catch( deploy::DeploymentException & )
+ {
+ extensionList.push_back(Reference<deploy::XPackage>());
+ }
+ catch( ucb::CommandFailedException & )
{
extensionList.push_back(Reference<deploy::XPackage>());
}
+
try
{
extensionList.push_back(getSharedRepository()->getDeployedPackage(
identifier, fileName, Reference<ucb::XCommandEnvironment>()));
- } catch (lang::IllegalArgumentException &)
+ }
+ catch (lang::IllegalArgumentException &)
+ {
+ extensionList.push_back(Reference<deploy::XPackage>());
+ }
+ // catch deploy::DeploymentException and ucb::CommandFailedException to avoid unhandled exceptions causing crashes
+ catch( deploy::DeploymentException & )
{
extensionList.push_back(Reference<deploy::XPackage>());
}
+ catch( ucb::CommandFailedException & )
+ {
+ extensionList.push_back(Reference<deploy::XPackage>());
+ }
+
try
{
extensionList.push_back(getBundledRepository()->getDeployedPackage(
identifier, fileName, Reference<ucb::XCommandEnvironment>()));
- } catch (lang::IllegalArgumentException &)
+ }
+ catch (lang::IllegalArgumentException &)
{
extensionList.push_back(Reference<deploy::XPackage>());
}
+ // catch deploy::DeploymentException and ucb::CommandFailedException to avoid unhandled exceptions causing crashes
+ catch( deploy::DeploymentException & )
+ {
+ extensionList.push_back(Reference<deploy::XPackage>());
+ }
+ catch( ucb::CommandFailedException & )
+ {
+ extensionList.push_back(Reference<deploy::XPackage>());
+ }
+
OSL_ASSERT(extensionList.size() == 3);
return extensionList;
}
@@ -1181,7 +1214,6 @@ uno::Sequence< uno::Sequence<Reference<deploy::XPackage> > >
uno::Sequence<Reference<deploy::XPackage> > bundledExt =
getBundledRepository()->getDeployedPackages(xAbort, xCmdEnv);
addExtensionsToMap(mapExt, bundledExt, OUSTR("bundled"));
- addExtensionsToMap(mapExt, bundledExt, OUSTR("bundled_prereg"));
// Create the tmp repository to trigger its clean up (deletion
// of old temporary data.)