ctf: better enum and variant verification
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core / src / org / eclipse / linuxtools / ctf / core / event / types / VariantDefinition.java
index ca81529db8d3d7ff53a08b50e84d00666ad58655..c3c313cd427f7a63d6e5451c8a400a09d7017cce 100644 (file)
@@ -152,7 +152,9 @@ public class VariantDefinition extends Definition implements IDefinitionScope {
         currentField = tagDefinition.getValue();
 
         Definition field = definitions.get(currentField);
-
+        if (field == null) {
+            throw new CTFReaderException("Variant was not defined for: "+ currentField); //$NON-NLS-1$
+        }
         field.read(input);
     }
 
This page took 0.024695 seconds and 5 git commands to generate.