File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/main/java/org/truffleruby/language/methods Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 10
10
package org .truffleruby .language .methods ;
11
11
12
12
import com .oracle .truffle .api .CompilerDirectives .TruffleBoundary ;
13
+ import com .oracle .truffle .api .TruffleException ;
13
14
import com .oracle .truffle .api .dsl .UnsupportedSpecializationException ;
14
15
import com .oracle .truffle .api .frame .VirtualFrame ;
15
16
import com .oracle .truffle .api .nodes .ControlFlowException ;
@@ -238,8 +239,10 @@ private DynamicObject translateThrowable(Throwable throwable) {
238
239
throw (AssertionError ) throwable ;
239
240
}
240
241
242
+ final boolean truffleException = throwable instanceof TruffleException ;
243
+
241
244
if (getContext ().getOptions ().EXCEPTIONS_PRINT_JAVA
242
- || getContext ().getOptions ().EXCEPTIONS_PRINT_UNCAUGHT_JAVA ) {
245
+ || (! truffleException && getContext ().getOptions ().EXCEPTIONS_PRINT_UNCAUGHT_JAVA ) ) {
243
246
throwable .printStackTrace ();
244
247
245
248
if (getContext ().getOptions ().EXCEPTIONS_PRINT_RUBY_FOR_JAVA ) {
You can’t perform that action at this time.
0 commit comments