linux.core: Add messages to IllegalStateExceptions
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Sun, 20 Mar 2016 21:11:06 +0000 (17:11 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 13 May 2016 17:02:55 +0000 (13:02 -0400)
Analysis modules now declare why they fail.

Change-Id: Idf4ec5ac0a0c7b96317512432ca8d9ab0ee4c61c
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/68875
Reviewed-by: Hudson CI
Reviewed-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Tested-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/contextswitch/KernelContextSwitchAnalysis.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageAnalysis.java

index d616281130384b0494d45f33221267a8deb1448a..7dc6b2ceaf4d4d8e9f0af1f659c6e06bc37ede17 100644 (file)
@@ -84,7 +84,7 @@ public class KernelContextSwitchAnalysis extends TmfStateSystemAnalysisModule {
 
         ITmfTrace trace = getTrace();
         if (trace == null) {
-            throw new IllegalStateException();
+            throw new IllegalStateException("Analysis requires a trace"); //$NON-NLS-1$
         }
         /*
          * This analysis depends on the LTTng kernel analysis, so it's added to
index 98d9446d84fd4bdcef1fc302e12eadad49936e60..0fb4f3135daa9a1127255883ece9b38dccb3f650 100644 (file)
@@ -106,7 +106,7 @@ public class KernelCpuUsageAnalysis extends TmfStateSystemAnalysisModule {
 
         ITmfTrace trace = getTrace();
         if (trace == null) {
-            throw new IllegalStateException();
+            throw new IllegalStateException("Analysis requires a trace"); //$NON-NLS-1$
         }
         /*
          * This analysis depends on the LTTng kernel analysis, so it's added to
This page took 0.025794 seconds and 5 git commands to generate.