public RaiseException(RubyException exception, boolean isNativeException) { super(exception.message.toString()); if (DEBUG) { Thread.dumpStack(); } this.nativeException = isNativeException; setException(exception, isNativeException); preRaise(exception.getRuntime().getCurrentContext()); }
public RaiseException(RubyException exception, boolean isNativeException) { super(exception.message.toString()); if (DEBUG) { Thread.dumpStack(); } this.nativeException = isNativeException; setException(exception, isNativeException); preRaise(exception.getRuntime().getCurrentContext()); }
protected RaiseException(String message, RubyException exception) { super(message); setException(exception); preRaise(exception.getRuntime().getCurrentContext()); }
protected RaiseException(String message, RubyException exception) { super(message); setException(exception); preRaise(exception.getRuntime().getCurrentContext()); }
/** * Construct a new RaiseException to wrap the given Ruby exception for Java-land * throwing purposes. * * This constructor will not generate a backtrace and will instead use the * one specified by the * * @param exception The Ruby exception to wrap * @param backtrace */ public RaiseException(RubyException exception, IRubyObject backtrace) { super(exception.message.toString()); if (DEBUG) { Thread.dumpStack(); } setException(exception, false); preRaise(exception.getRuntime().getCurrentContext(), backtrace); }
/** * Construct a new RaiseException to wrap the given Ruby exception for Java-land * throwing purposes. * * This constructor will not generate a backtrace and will instead use the * one specified by the * * @param exception The Ruby exception to wrap * @param backtrace */ public RaiseException(RubyException exception, IRubyObject backtrace) { super(exception.message.toString()); if (DEBUG) { Thread.dumpStack(); } setException(exception, false); preRaise(exception.getRuntime().getCurrentContext(), backtrace); }
@Deprecated public RaiseException(Ruby runtime, RubyClass excptnClass, String msg, IRubyObject backtrace) { super(msg == null ? msg = "No message available" : msg); providedMessage = '(' + excptnClass.getName() + ") " + msg; final ThreadContext context = runtime.getCurrentContext(); setException((RubyException) Helpers.invoke( context, excptnClass, "new", RubyString.newUnicodeString(runtime, msg))); preRaise(context, backtrace); }
@Deprecated public RaiseException(Ruby runtime, RubyClass excptnClass, String msg, IRubyObject backtrace) { super(msg == null ? msg = "No message available" : msg); providedMessage = '(' + excptnClass.getName() + ") " + msg; final ThreadContext context = runtime.getCurrentContext(); setException((RubyException) Helpers.invoke( context, excptnClass, "new", RubyString.newUnicodeString(runtime, msg))); preRaise(context, backtrace); }
@Deprecated public RaiseException(Throwable cause, org.jruby.NativeException nativeException) { super(nativeException.getMessageAsJavaString(), cause); providedMessage = super.getMessage(); // cause.getClass().getId() + ": " + message setException(nativeException); preRaise(nativeException.getRuntime().getCurrentContext(), nativeException.getCause().getStackTrace()); setStackTrace(RaiseException.javaTraceFromRubyTrace(exception.getBacktraceElements())); }
@Deprecated public RaiseException(Throwable cause, org.jruby.NativeException nativeException) { super(nativeException.getMessageAsJavaString(), cause); providedMessage = super.getMessage(); // cause.getClass().getId() + ": " + message setException(nativeException); preRaise(nativeException.getRuntime().getCurrentContext(), nativeException.getCause().getStackTrace()); setStackTrace(RaiseException.javaTraceFromRubyTrace(exception.getBacktraceElements())); }
public RaiseException(Throwable cause, NativeException nativeException) { super(buildMessage(cause), cause); providedMessage = buildMessage(cause); setException(nativeException, true); preRaise(nativeException.getRuntime().getCurrentContext(), nativeException.getCause().getStackTrace()); setStackTrace(javaTraceFromRubyTrace(exception.getBacktraceElements())); }
public RaiseException(Throwable cause, NativeException nativeException) { super(buildMessage(cause), cause); providedMessage = buildMessage(cause); setException(nativeException, true); preRaise(nativeException.getRuntime().getCurrentContext(), nativeException.getCause().getStackTrace()); setStackTrace(javaTraceFromRubyTrace(exception.getBacktraceElements())); }
public RaiseException(Ruby runtime, RubyClass excptnClass, String msg, IRubyObject backtrace, boolean nativeException) { super(msg); if (msg == null) { msg = "No message available"; } providedMessage = "(" + excptnClass.getName() + ") " + msg; this.nativeException = nativeException; if (DEBUG) { Thread.dumpStack(); } setException((RubyException) Helpers.invoke( runtime.getCurrentContext(), excptnClass, "new", RubyString.newUnicodeString(excptnClass.getRuntime(), msg)), nativeException); preRaise(runtime.getCurrentContext(), backtrace); }
public RaiseException(Ruby runtime, RubyClass excptnClass, String msg, boolean nativeException) { super(msg); if (msg == null) { msg = "No message available"; } providedMessage = "(" + excptnClass.getName() + ") " + msg; this.nativeException = nativeException; if (DEBUG) { Thread.dumpStack(); } setException((RubyException) Helpers.invoke( runtime.getCurrentContext(), excptnClass, "new", RubyString.newUnicodeString(excptnClass.getRuntime(), msg)), nativeException); preRaise(runtime.getCurrentContext()); }
public RaiseException(Ruby runtime, RubyClass excptnClass, String msg, boolean nativeException) { super(msg); if (msg == null) { msg = "No message available"; } providedMessage = "(" + excptnClass.getName() + ") " + msg; this.nativeException = nativeException; if (DEBUG) { Thread.dumpStack(); } setException((RubyException) Helpers.invoke( runtime.getCurrentContext(), excptnClass, "new", RubyString.newUnicodeString(excptnClass.getRuntime(), msg)), nativeException); preRaise(runtime.getCurrentContext()); }
public RaiseException(Ruby runtime, RubyClass excptnClass, String msg, IRubyObject backtrace, boolean nativeException) { super(msg); if (msg == null) { msg = "No message available"; } providedMessage = "(" + excptnClass.getName() + ") " + msg; this.nativeException = nativeException; if (DEBUG) { Thread.dumpStack(); } setException((RubyException) Helpers.invoke( runtime.getCurrentContext(), excptnClass, "new", RubyString.newUnicodeString(excptnClass.getRuntime(), msg)), nativeException); preRaise(runtime.getCurrentContext(), backtrace); }