mirror of
https://github.com/enso-org/enso.git
synced 2025-01-09 01:26:59 +03:00
Fix for the catch panic when instrumented RuntimeErrorsTest
This commit is contained in:
parent
63350f11b6
commit
b89275bf2c
@ -20,6 +20,7 @@ import org.enso.interpreter.runtime.EnsoContext;
|
||||
import org.enso.interpreter.runtime.callable.argument.CallArgumentInfo;
|
||||
import org.enso.interpreter.runtime.data.atom.AtomNewInstanceNode;
|
||||
import org.enso.interpreter.runtime.error.PanicException;
|
||||
import org.enso.interpreter.runtime.error.PanicSentinel;
|
||||
import org.enso.interpreter.runtime.state.State;
|
||||
|
||||
@BuiltinMethod(
|
||||
@ -61,7 +62,11 @@ public abstract class CatchPanicNode extends Node {
|
||||
@CachedLibrary(limit = "3") InteropLibrary interop) {
|
||||
try {
|
||||
// Note [Tail call]
|
||||
return thunkExecutorNode.executeThunk(frame, action, state, BaseNode.TailStatus.NOT_TAIL);
|
||||
var ret = thunkExecutorNode.executeThunk(frame, action, state, BaseNode.TailStatus.NOT_TAIL);
|
||||
if (ret instanceof PanicSentinel sentinel) {
|
||||
throw sentinel.getPanic();
|
||||
}
|
||||
return ret;
|
||||
} catch (PanicException e) {
|
||||
panicBranchProfile.enter();
|
||||
Object payload = e.getPayload();
|
||||
|
Loading…
Reference in New Issue
Block a user