Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Mueller2015-07-16 14:42:11 +0000
committerMarvin Mueller2015-07-16 14:44:54 +0000
commitba60c77ae6afb3a43d82b9ac84677c04d43d5e9d (patch)
treea3276cfb8a64fab5439fc38fbc3d7fcd37666158 /org.eclipse.jubula.toolkit.common
parentb1b04a6e434840fe2880acae97c03e4fcf5d825c (diff)
downloadorg.eclipse.jubula.core-ba60c77ae6afb3a43d82b9ac84677c04d43d5e9d.tar.gz
org.eclipse.jubula.core-ba60c77ae6afb3a43d82b9ac84677c04d43d5e9d.tar.xz
org.eclipse.jubula.core-ba60c77ae6afb3a43d82b9ac84677c04d43d5e9d.zip
Sprint task - add error handling for errors in toolkits and extensions
Diffstat (limited to 'org.eclipse.jubula.toolkit.common')
-rw-r--r--org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java b/org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java
index b091d5c8d..54b6fc547 100644
--- a/org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java
+++ b/org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java
@@ -14,7 +14,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.ResourceBundle;
import org.eclipse.core.runtime.CoreException;
@@ -54,6 +56,9 @@ public class ComponentBuilder extends AbstractComponentBuilder {
/** The logger. */
private static Logger log = LoggerFactory.getLogger(ComponentBuilder.class);
+ /** exception during initialization with {@link #initCompSystem()} */
+ private Map<String, Exception> m_initExceptions =
+ new HashMap<String, Exception>();
/**
* Default constructor.
@@ -63,6 +68,14 @@ public class ComponentBuilder extends AbstractComponentBuilder {
}
/**
+ *
+ * @return the Exceptions which occurred during initialization
+ */
+ public Map<String, Exception> getInitExceptions() {
+ return m_initExceptions;
+ }
+
+ /**
* Initializes the Component System.<br>
* Reads in all ComponentConfiguration Files of all installed
* Toolkit-Plugins.
@@ -103,10 +116,20 @@ public class ComponentBuilder extends AbstractComponentBuilder {
final String msg = Messages.ComponenConfigurationNotFound
+ StringConstants.EXCLAMATION_MARK;
log.error(msg, fileNotFoundEx);
+ m_initExceptions.put(extension.getContributor().getName(),
+ fileNotFoundEx);
} catch (CoreException coreEx) {
final String msg = Messages.CouldNotCreateToolkitProvider
+ StringConstants.EXCLAMATION_MARK;
log.error(msg, coreEx);
+ m_initExceptions.put(extension.getContributor().getName(),
+ coreEx);
+ } catch (RuntimeException ce) {
+ final String msg = Messages.CouldNotCreateToolkitProvider
+ + StringConstants.EXCLAMATION_MARK;
+ log.error(msg, ce);
+ m_initExceptions.put(extension.getContributor().getName(),
+ ce);
}
}
}

Back to the top