Skip to content
Snippets Groups Projects
Commit 046c888e authored by Jaroslav Tulach's avatar Jaroslav Tulach
Browse files

Wrap only IOException to RuntimeException. Leave other exceptions untouched.

parent 09ab1569
Branches
No related tags found
No related merge requests found
......@@ -22,6 +22,8 @@
*/
package com.oracle.truffle.r.nodes.builtin.fastr;
import java.io.IOException;
import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.Specialization;
......@@ -51,14 +53,16 @@ public class FastRInterop {
try {
callTarget = RContext.getInstance().getEnv().parse(sourceObject);
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
emitIO();
} catch (IOException e) {
throw new RuntimeException(e);
}
return callTarget.call();
}
private void emitIO() throws IOException {
}
}
@RBuiltin(name = ".fastr.interop.export", visibility = RVisibility.OFF, kind = RBuiltinKind.PRIMITIVE, parameterNames = {"name", "value"})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment