Skip to content

Commit cef43a7

Browse files
committed
better error message
1 parent 4f20c8c commit cef43a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/PythonObjectLibrary.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ public void setDict(PythonAbstractObject receiver, PHashingCollection dict) thro
6868
throw UnsupportedMessageException.create();
6969
}
7070

71-
public abstract LazyPythonClass getLazyPythonClass(PythonAbstractObject receiver);
71+
@Abstract
72+
public LazyPythonClass getLazyPythonClass(PythonAbstractObject receiver) {
73+
throw new AbstractMethodError(receiver.getClass().getCanonicalName());
74+
}
7275

7376
public void setLazyPythonClass(PythonAbstractObject receiver, LazyPythonClass cls) {
7477
PRaiseNode.getUncached().raise(PythonBuiltinClassType.TypeError, "__class__ assignment only supported for heap types or ModuleType subclasses, not '%p'", receiver);

0 commit comments

Comments
 (0)