diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java index d200eba9cb35d29b2f5a45318e5ef5becb4c9876..c9425485e9b253815493b6497c059fe66c4e9622 100644 --- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java +++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java @@ -22,8 +22,6 @@ */ package com.oracle.truffle.r.engine.shell; -import java.io.IOException; - import com.oracle.truffle.api.source.Source; import com.oracle.truffle.api.vm.PolyglotEngine; import com.oracle.truffle.r.runtime.RCmdOptions; @@ -73,7 +71,7 @@ public class REmbedded { PolyglotEngine vm = RCommand.createPolyglotEngineFromCommandLine(options, true, true, System.in, System.out); try { vm.eval(INIT); - } catch (IOException ex) { + } catch (Exception ex) { Utils.rSuicideDefault("initializeR"); } return vm; diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java index bb9b3f49054c9a39298b4f3328df2ac7864771b5..8b18fe730b9297c447db7f0e754c47c8ebafc0fc 100644 --- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java +++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java @@ -312,7 +312,10 @@ class ChimneySweeping extends SingleBuiltinDiagnostics { Value eval = vm.eval(RSource.fromTextInternal(argsExpr, RSource.Internal.UNIT_TEST)); RList args = (RList) eval.get(); return args; - } catch (IOException e) { + } catch (Exception e) { + if (e instanceof RuntimeException) { + throw (RuntimeException) e; + } // throw new RuntimeException(e); // todo: warning return null; diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/ContextInfo.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/ContextInfo.java index 131397b5d5b24fca57d33a6ebe44410d424d863b..26ada32c6060df9adc60f7772ce416e6014c8ce5 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/ContextInfo.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/ContextInfo.java @@ -22,7 +22,6 @@ */ package com.oracle.truffle.r.runtime.context; -import java.io.IOException; import java.util.TimeZone; import java.util.concurrent.atomic.AtomicInteger; @@ -94,7 +93,7 @@ public final class ContextInfo implements TruffleObject { public static ContextInfo getContextInfo(PolyglotEngine vm) { try { return (ContextInfo) vm.findGlobalSymbol(ContextInfo.GLOBAL_SYMBOL).get(); - } catch (IOException ex) { + } catch (Exception ex) { throw RInternalError.shouldNotReachHere(); } }