Skip to content

Commit bd6512f

Browse files
committed
Do not silently ignore internal errors in launcher.
1 parent 30c9491 commit bd6512f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,16 @@ public int readEvalPrint(Context context, ConsoleHandler consoleHandler) {
667667
} else if (e.isExit()) {
668668
// usually from quit
669669
throw new ExitException(e.getExitStatus());
670-
} else if (e.isHostException() || e.isInternalError()) {
670+
} else if (e.isHostException()) {
671671
// we continue the repl even though the system may be broken
672672
lastStatus = 1;
673673
System.out.println(e.getMessage());
674+
} else if (e.isInternalError()) {
675+
System.err.println("An internal error occurred:");
676+
printPythonLikeStackTrace(e);
677+
678+
// we continue the repl even though the system may be broken
679+
lastStatus = 1;
674680
} else if (e.isGuestException()) {
675681
// drop through to continue REPL and remember last eval was an error
676682
lastStatus = 1;

0 commit comments

Comments
 (0)