fix: more stable engine exit
This commit is contained in:
parent
0b6484e0b4
commit
51b347e0d7
@ -40,7 +40,7 @@ public final class Engine implements EventLoop {
|
||||
try {
|
||||
((Task<Object>)task).notifier.complete(task.runnable.get());
|
||||
}
|
||||
catch (CancellationException e) { throw e; }
|
||||
catch (CancellationException e) { task.notifier.cancel(false); throw e; }
|
||||
catch (RuntimeException e) { task.notifier.completeExceptionally(e); }
|
||||
}
|
||||
catch (InterruptedException | CancellationException e) {
|
||||
|
@ -213,7 +213,9 @@ public final class Frame {
|
||||
catch (StackOverflowError e) { throw STACK_OVERFLOW; }
|
||||
catch (EngineException e) { error = e; }
|
||||
catch (RuntimeException e) {
|
||||
if (!(e instanceof CancellationException)) {
|
||||
System.out.println(dbg.getMapOrEmpty(function).toLocation(codePtr, true));
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user