diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java
index 9de478bc4909e01e984ecd0ef4ca6f1e61b39e84..29b6af3ec56889fefb10ab75f4bebf424b7020e8 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java
@@ -419,8 +419,9 @@ public class RDeparse {
             } catch (IOException e) {
                 RInternalError.reportError(e);
                 fixupSourcesTextInternal();
-            } catch (NoSuchAlgorithmException e) {
-                throw RInternalError.shouldNotReachHere("SHA-256 is an unknown algorithm");
+            } catch (Throwable e) {
+                RInternalError.reportError(e);
+                fixupSourcesTextInternal();
             }
         }
 
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInternalError.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInternalError.java
index 97a9ef4253e4d9abf1eaeed1b6ceb4b7a5385367..7ba302c0e9315aa49ec2d5c44481e86ad9d45cde 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInternalError.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RInternalError.java
@@ -158,11 +158,12 @@ public final class RInternalError extends Error implements TruffleException {
     }
 
     @TruffleBoundary
-    public static void reportError(Throwable throwable) {
-        reportError(throwable, 0);
+    public static void reportError(Throwable t) {
+        String message = t instanceof RInternalError && t.getMessage() != null && !t.getMessage().isEmpty() ? t.getMessage() : "internal error: " + t.getClass().getSimpleName();
+        reportError(message, t, 0);
     }
 
-    private static void reportError(Throwable throwable, int contextId) {
+    private static void reportError(String message, Throwable throwable, int contextId) {
         try {
             Throwable t = throwable;
             if (FastROptions.PrintErrorStacktracesToFile.getBooleanValue() || FastROptions.PrintErrorStacktraces.getBooleanValue()) {
@@ -184,7 +185,6 @@ public final class RInternalError extends Error implements TruffleException {
                     System.err.println(out.toString());
                     System.err.println(verboseStackTrace);
                 }
-                String message = t instanceof RInternalError && t.getMessage() != null && !t.getMessage().isEmpty() ? t.getMessage() : "internal error: " + t.getClass().getSimpleName();
                 if (FastROptions.PrintErrorStacktracesToFile.getBooleanValue()) {
                     String suffix = contextId == 0 ? "" : "-" + Integer.toString(contextId);
                     Path logfile = Utils.getLogPath("fastr_errors.log" + suffix);