Skip to content

Commit

Permalink
Catch ProcessSwitch in headless mode only
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Nov 14, 2024
1 parent 29bd189 commit 89db875
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ protected static final Object send(final AbstractSqueakObject receiver, final Me
return performInteropSendNode.execute(node, receiver, message, arguments);
} catch (final ProcessSwitch ps) {
CompilerDirectives.transferToInterpreter();
image.printToStdErr(ps);
throw new IllegalArgumentException();
if (image.options.isHeadless()) {
image.printToStdErr(ps);
throw new IllegalArgumentException();
} else {
throw ps; // open debugger in interactive mode
}
} finally {
if (wasActive) {
image.interrupt.activate();
Expand Down

0 comments on commit 89db875

Please sign in to comment.