We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f90864 commit 260cae0Copy full SHA for 260cae0
truffle/src/main/java/org/jruby/truffle/TruffleBridgeImpl.java
@@ -155,6 +155,13 @@ public void init() {
155
truffleContext.getFeatureManager().require(requiredLibrary, null);
156
} catch (IOException e) {
157
throw new RuntimeException(e);
158
+ } catch (RaiseException e) {
159
+ // Translate LoadErrors for JRuby since we're outside an ExceptionTranslatingNode.
160
+ if (e.getRubyException().getLogicalClass() == truffleContext.getCoreLibrary().getLoadErrorClass()) {
161
+ throw truffleContext.getRuntime().newLoadError(e.getRubyException().getMessage().toString(), requiredLibrary);
162
+ } else {
163
+ throw e;
164
+ }
165
}
166
167
0 commit comments