Skip to content

Commit 2551473

Browse files
committed
Lower TruffleBoundary
1 parent 4f317c2 commit 2551473

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement/ExceptionHandlingStatementNode.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,13 @@ public static PException wrapJavaException(Throwable e, Node node, PBaseExceptio
196196
return pe.getExceptionForReraise();
197197
}
198198

199-
@TruffleBoundary
200199
protected PException wrapJavaExceptionIfApplicable(Throwable e) {
201-
if (e instanceof StackOverflowError) {
202-
return wrapJavaException(e, this, factory().createBaseException(RecursionError, "maximum recursion depth exceeded", new Object[]{}));
203-
}
204200
if (shouldCatchAllExceptions() && (e instanceof Exception || e instanceof AssertionError)) {
205201
return wrapJavaException(e, this, factory().createBaseException(SystemError, "%m", new Object[]{e}));
206202
}
203+
if (e instanceof StackOverflowError) {
204+
return wrapJavaException(e, this, factory().createBaseException(RecursionError, "maximum recursion depth exceeded", new Object[]{}));
205+
}
207206
return null;
208207
}
209208

0 commit comments

Comments
 (0)