Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/RubyThread.java
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@
import org.jruby.internal.runtime.RubyRunnable;
import org.jruby.internal.runtime.ThreadLike;
import org.jruby.internal.runtime.ThreadService;
import org.jruby.javasupport.JavaUtil;
import org.jruby.runtime.Block;
import org.jruby.runtime.ObjectAllocator;
import org.jruby.runtime.ThreadContext;
@@ -1492,7 +1493,7 @@ public void exceptionRaised(Throwable exception) {
Ruby runtime = getRuntime();
if (abortOnException(runtime) && exception instanceof Error) {
// re-propagate on main thread
runtime.getThreadService().getMainThread().getNativeThread().stop(exception);
runtime.getThreadService().getMainThread().raise(JavaUtil.convertJavaToUsableRubyObject(runtime, exception));
} else {
// just rethrow on this thread, let system handlers report it
Helpers.throwException(exception);

0 comments on commit caa5904

Please sign in to comment.