You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/02/15 14:28:08 UTC
svn commit: r1446574 -
/openoffice/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx
Author: orw
Date: Fri Feb 15 13:28:08 2013
New Revision: 1446574
URL: http://svn.apache.org/r1446574
Log:
#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.
Modified:
openoffice/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx
Modified: openoffice/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx?rev=1446574&r1=1446573&r2=1446574&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx (original)
+++ openoffice/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx Fri Feb 15 13:28:08 2013
@@ -313,26 +313,59 @@ void ExtensionManager::addExtensionsToMa
{ //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<d
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.)