Created
February 18, 2012 04:12
-
-
Save headius/1857349 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment