public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
diff --git a/src/org/jruby/javasupport/JavaCallable.java b/src/org/jruby/javasupport/JavaCallable.java
index bdb732b..35fe08c 100644
--- a/src/org/jruby/javasupport/JavaCallable.java
+++ b/src/org/jruby/javasupport/JavaCallable.java
@@ -44,6 +44,7 @@ import org.jruby.RubyFixnum;
import org.jruby.RubyString;
import org.jruby.anno.JRubyMethod;
import org.jruby.runtime.builtin.IRubyObject;
+import org.jruby.util.unsafe.UnsafeFactory;
public abstract class JavaCallable extends JavaAccessibleObject implements ParameterTypes {
protected final Class<?>[] parameterTypes;
@@ -161,14 +162,14 @@ public abstract class JavaCallable extends JavaAccessibleObject implements Param
}
protected IRubyObject handleThrowable(Throwable t, Member target) {
- getRuntime().getJavaSupport().handleNativeException(t, target);
- // This point is only reached if there was an exception handler installed.
+ UnsafeFactory.getUnsafe().throwException(t);
+ // not reached
return getRuntime().getNil();
}
protected IRubyObject handleInvocationTargetEx(InvocationTargetException ite, Member target) {
- getRuntime().getJavaSupport().handleNativeException(ite.getTargetException(), target);
- // This point is only reached if there was an exception handler installed.
+ UnsafeFactory.getUnsafe().throwException(ite.getTargetException());
+ // not reached
return getRuntime().getNil();
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.