tmf: Replace IllegalStateException with Activator.logError()
authorJean-Christian Kouame <jean-christian.kouame@ericsson.com>
Wed, 27 Apr 2016 15:12:06 +0000 (11:12 -0400)
committerJean-Christian Kouame <jean-christian.kouame@ericsson.com>
Wed, 11 May 2016 18:23:09 +0000 (14:23 -0400)
IllegalStateException was raised when the action cannot be found. This
patch avoids to block the UI when the problem happens.

Change-Id: Ied85dd924a6fa330b165d5d10027c92f20e2f14d
Signed-off-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/71529
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/internal/tmf/analysis/xml/core/model/TmfXmlScenario.java

index 2e1f0cdc0e78afd9118e293c707a02d4f96168bb..c4b551f20a9d7c8125e9a44fa213009838f54eb3 100644 (file)
@@ -12,6 +12,7 @@ import java.util.List;
 
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.Activator;
 import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.model.TmfXmlScenarioHistoryBuilder.ScenarioStatusType;
 import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
 import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.pattern.stateprovider.XmlPatternStateProvider;
@@ -105,7 +106,8 @@ public class TmfXmlScenario {
             if (action != null) {
                 action.execute(event, fScenarioInfo);
             } else {
-                throw new IllegalStateException("Action " + actionId + " cannot be found."); //$NON-NLS-1$ //$NON-NLS-2$
+                Activator.logError("Action " + actionId + " cannot be found."); //$NON-NLS-1$ //$NON-NLS-2$
+                return;
             }
         }
 
This page took 0.026745 seconds and 5 git commands to generate.