Skip to content

Commit d51969a

Browse files
committed
fix debugging during context initialization
1 parent 17b132f commit d51969a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/PythonLanguage.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,11 @@ protected String toString(PythonContext context, Object value) {
493493
}
494494
// This is not a good place to report inconsistencies in any of the above conditions. Just
495495
// return a String
496-
return ((PythonAbstractObject) value).toString();
496+
if (value instanceof PythonAbstractObject) {
497+
return ((PythonAbstractObject) value).toString();
498+
} else {
499+
return "illegal object";
500+
}
497501
}
498502

499503
public static TruffleLogger getLogger() {

0 commit comments

Comments
 (0)