Skip to content

Commit 34d5213

Browse files
committed
Fix contract violation
1 parent 83d22be commit 34d5213

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/exception

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/exception/PException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ RuntimeException throwException() {
355355
@ExportMessage
356356
@SuppressWarnings("static-method")
357357
boolean hasSourceLocation() {
358-
return getLocation() != null;
358+
return getLocation() != null && getLocation().getEncapsulatingSourceSection() != null;
359359
}
360360

361361
@ExportMessage(name = "getSourceLocation")

0 commit comments

Comments
 (0)