Skip to content

Commit 5ca7993

Browse files
committed
Also handle 'StackOverflowError' in 'TopLevelExceptionHandler'.
1 parent 44051d2 commit 5ca7993

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/control/TopLevelExceptionHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public Object execute(VirtualFrame frame) {
113113
} catch (PException e) {
114114
printExc(e);
115115
return null;
116-
} catch (Exception e) {
116+
} catch (Exception | StackOverflowError e) {
117117
if (PythonOptions.getOption(context.get(), PythonOptions.WithJavaStacktrace)) {
118118
boolean exitException = e instanceof TruffleException && ((TruffleException) e).isExit();
119119
if (!exitException) {
@@ -207,7 +207,7 @@ private void handleSystemExit(PException e) {
207207
}
208208

209209
@TruffleBoundary
210-
private static void printStackTrace(Exception e) {
210+
private static void printStackTrace(Throwable e) {
211211
e.printStackTrace();
212212
}
213213

0 commit comments

Comments
 (0)