Skip to content

Commit

Permalink
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -155,6 +155,13 @@ public void init() {
truffleContext.getFeatureManager().require(requiredLibrary, null);
} catch (IOException e) {
throw new RuntimeException(e);
} catch (RaiseException e) {
// Translate LoadErrors for JRuby since we're outside an ExceptionTranslatingNode.
if (e.getRubyException().getLogicalClass() == truffleContext.getCoreLibrary().getLoadErrorClass()) {
throw truffleContext.getRuntime().newLoadError(e.getRubyException().getMessage().toString(), requiredLibrary);
} else {
throw e;
}
}
}

0 comments on commit 260cae0

Please sign in to comment.