浏览代码

No such member now throws ComileException instead of logging to sout

kindlich 5 年前
父节点
当前提交
1f81e8a541
找不到此签名对应的密钥
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/Expression.java

+ 2
- 2
CodeModel/src/main/java/org/openzen/zenscript/codemodel/expression/Expression.java 查看文件

@@ -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
 	

正在加载...
取消
保存