Skip to content
Snippets Groups Projects
Commit 61df03c0 authored by Tomas Stupka's avatar Tomas Stupka
Browse files

on error reset handlers in FastRTry

parent 514efe21
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,8 @@ import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
import com.oracle.truffle.r.nodes.function.call.RExplicitCallNode;
import com.oracle.truffle.r.runtime.RErrorHandling;
import com.oracle.truffle.r.runtime.RInternalError;
import com.oracle.truffle.r.runtime.RRuntime;
import com.oracle.truffle.r.runtime.builtins.RBuiltin;
import com.oracle.truffle.r.runtime.data.RArgsValuesAndNames;
......@@ -53,6 +55,9 @@ public abstract class FastRTry extends RBuiltinNode.Arg1 {
try {
call.execute(frame, func, RArgsValuesAndNames.EMPTY);
} catch (Throwable ex) {
// try to recover from a possibly incosistent state when running tests:
// some handlers might still be lying around and interfere with subsequent calls
RErrorHandling.resetStacks();
return formatError(ex);
}
return RRuntime.LOGICAL_TRUE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment