Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-05-30 15:38:42 +0000
committerslewis2009-05-30 15:38:42 +0000
commit4525038d18d1e0915d9dff5b229e5b16fe73bc1a (patch)
tree7b874be187a2d2d578f69b1ff46551b467898205 /framework
parenta44bde38d6408b3092e57d6f536569e8212ebf4d (diff)
downloadorg.eclipse.ecf-4525038d18d1e0915d9dff5b229e5b16fe73bc1a.tar.gz
org.eclipse.ecf-4525038d18d1e0915d9dff5b229e5b16fe73bc1a.tar.xz
org.eclipse.ecf-4525038d18d1e0915d9dff5b229e5b16fe73bc1a.zip
Fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=278222
Diffstat (limited to 'framework')
-rw-r--r--framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java
index 7eb0cbecf..b742b258e 100644
--- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java
+++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java
@@ -251,7 +251,14 @@ public class ContainerFactory implements IContainerFactory, IContainerManager {
* @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String)
*/
public IContainer createContainer(String containerTypeDescriptionName) throws ContainerCreateException {
- return createContainer(getDescriptionByName(containerTypeDescriptionName), (Object[]) null);
+ return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), (Object[]) null);
+ }
+
+ private ContainerTypeDescription getDescriptionByNameWithException(String containerTypeDescriptionName) throws ContainerCreateException {
+ ContainerTypeDescription typeDescription = getDescriptionByName(containerTypeDescriptionName);
+ if (typeDescription == null)
+ throw new ContainerCreateException("Container type description with name=" + containerTypeDescriptionName + " not found. This may indicate that the desired provider is not available or not startable within runtime."); //$NON-NLS-1$ //$NON-NLS-2$
+ return typeDescription;
}
/*
@@ -296,7 +303,7 @@ public class ContainerFactory implements IContainerFactory, IContainerManager {
* java.lang.Object[])
*/
public IContainer createContainer(String containerTypeDescriptionName, Object[] parameters) throws ContainerCreateException {
- return createContainer(getDescriptionByName(containerTypeDescriptionName), parameters);
+ return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), parameters);
}
/* (non-Javadoc)
@@ -318,7 +325,7 @@ public class ContainerFactory implements IContainerFactory, IContainerManager {
public IContainer createContainer(String containerTypeDescriptionName, ID containerID, Object[] parameters) throws ContainerCreateException {
if (containerID == null)
throw new ContainerCreateException(Messages.ContainerFactory_EXCEPTION_CONTAINERID_NOT_NULL);
- return createContainer(getDescriptionByName(containerTypeDescriptionName), containerID, parameters);
+ return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), containerID, parameters);
}
/* (non-Javadoc)
@@ -334,7 +341,7 @@ public class ContainerFactory implements IContainerFactory, IContainerManager {
* @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String, org.eclipse.ecf.core.identity.ID)
*/
public IContainer createContainer(String containerTypeDescriptionName, ID containerID) throws ContainerCreateException {
- return createContainer(getDescriptionByName(containerTypeDescriptionName), new Object[] {containerID});
+ return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), new Object[] {containerID});
}
/*

Back to the top