Skip to content
Snippets Groups Projects
Commit 9c8619ec authored by Mick Jordan's avatar Mick Jordan
Browse files

msg not crash when options(error=expr) is set

parent 9123f080
No related branches found
No related tags found
No related merge requests found
......@@ -156,6 +156,10 @@ public final class RError extends RuntimeException {
if (errorExpr instanceof RLanguage || errorExpr instanceof RExpression) {
FrameInstance frameInstance = Truffle.getRuntime().getCurrentFrame();
VirtualFrame frame = (VirtualFrame) frameInstance.getFrame(FrameAccess.NONE, true);
if (frame == null) {
RContext.getInstance().getConsoleHandler().print("Sorry, options(error=expr) is currently not implemented");
throw new RError(null, "");
}
if (errorExpr instanceof RLanguage) {
RContext.getEngine().eval((RLanguage) errorExpr, frame);
} else if (errorExpr instanceof RExpression) {
......
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