Bläddra i källkod

No such member now throws ComileException instead of logging to sout

kindlich 5 år sedan
förälder
incheckning
1f81e8a541
Ingen känd nyckel hittad för denna signaturen i databasen

+ 2
- 2
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/Expression.java Visa fil

@@ -122,11 +122,11 @@ public abstract class Expression implements IPartialExpression {
122 122
 	}
123 123
 	
124 124
 	@Override
125
-	public IPartialExpression getMember(CodePosition position, TypeScope scope, List<StoredType> hints, GenericName name) {
125
+	public IPartialExpression getMember(CodePosition position, TypeScope scope, List<StoredType> hints, GenericName name) throws CompileException {
126 126
 		TypeMembers members = scope.getTypeMembers(type);
127 127
 		IPartialExpression result = members.getMemberExpression(position, scope, this, name, false);
128 128
 		if (result == null)
129
-			System.out.println("No such member: " + name.name);
129
+		    throw new CompileException(position, CompileExceptionCode.NO_SUCH_MEMBER, "No such member: " + name.name);
130 130
 		return result;
131 131
 	}
132 132
 	

Loading…
Avbryt
Spara