X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FExpression.java;h=3a2f845fe88191cb594022c5e0c49f60197b1db5;hp=427acbd19b9dbbdd082df33f7c8ca97b0792d3ed;hb=4ebc60b24db646dc2c64dd54190b029b8e28d030;hpb=fe1a2f532761669e67da4db4ae15096ced8a04db diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/Expression.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/Expression.java index 427acbd19..3a2f845fe 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/Expression.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/Expression.java @@ -61,10 +61,10 @@ public abstract class Expression extends Symbol implements Typed { try { updateType(); } catch (MatchException e) { - throw new InternalCompilerError(e); + throw new InternalCompilerError(location, e); } if(type == null) - throw new InternalCompilerError(getClass().getSimpleName() + + throw new InternalCompilerError(location, getClass().getSimpleName() + ".updateType couldn't compute its type."); } return type; @@ -242,7 +242,7 @@ public abstract class Expression extends Symbol implements Typed { public void getParameters(TranslationContext translationContext, ArrayList parameters) { - throw new InternalCompilerError("Class " + getClass().getSimpleName() + " does not support getParameters."); + throw new InternalCompilerError(location, "Class " + getClass().getSimpleName() + " does not support getParameters."); } public Expression resolveAsPattern(TranslationContext context) { @@ -252,7 +252,7 @@ public abstract class Expression extends Symbol implements Typed { public Expression checkTypeAsPattern(TypingContext context, Type requiredType) { if(context.isInPattern()) - throw new InternalCompilerError("Already in a pattern."); + throw new InternalCompilerError(location, "Already in a pattern."); context.setInPattern(true); Expression expression = checkType(context, requiredType); context.setInPattern(false); @@ -282,7 +282,7 @@ public abstract class Expression extends Symbol implements Typed { } public Expression replace(ReplaceContext context) { - throw new InternalCompilerError(getClass().getSimpleName() + " does not support replace."); + throw new InternalCompilerError(location, getClass().getSimpleName() + " does not support replace."); } public static Expression[] replace(ReplaceContext context, Expression[] expressions) {