Package org.jruby.exceptions
Class RaiseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jruby.exceptions.JumpException
org.jruby.exceptions.RaiseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Exception
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.exceptions.JumpException
JumpException.FlowControlException, JumpException.SpecialJump -
Field Summary
Fields inherited from class org.jruby.exceptions.JumpException
SPECIAL_JUMP -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRaiseException(String message, RubyException exception) RaiseException(Throwable cause, NativeException nativeException) Deprecated.RaiseException(RubyException exception) Deprecated.RaiseException(RubyException exception, boolean unused) Deprecated.RaiseException(RubyException exception, IRubyObject backtrace) Deprecated.RaiseException(Ruby runtime, RubyClass exceptionClass, String msg) Deprecated.RaiseException(Ruby runtime, RubyClass exceptionClass, String msg, boolean unused) Deprecated.RaiseException(Ruby runtime, RubyClass exceptionClass, String msg, IRubyObject backtrace) Deprecated.RaiseException(Ruby runtime, RubyClass exceptionClass, String msg, IRubyObject backtrace, boolean unused) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic RaiseExceptioncreateNativeRaiseException(Ruby runtime, Throwable cause) Deprecated.static RaiseExceptioncreateNativeRaiseException(Ruby runtime, Throwable cause, Member target) Deprecated.final ThrowableThis method don't do anything for performance reasons.static RaiseExceptionfrom(RubyException exception, IRubyObject backtrace) Deprecated.static RaiseExceptionConstruct a new throwable RaiseException appropriate for the target Ruby exception class.static RaiseExceptionfrom(Ruby runtime, String exceptionPath, String msg, IRubyObject backtrace) Construct a new throwable RaiseException appropriate for the target Ruby exception class.static RaiseExceptionfrom(Ruby runtime, String exceptionPath, IRubyObject... args) Construct a new throwable RaiseException appropriate for the target Ruby exception class.static RaiseExceptionConstruct a new throwable RaiseException appropriate for the target Ruby exception class.static RaiseExceptionfrom(Ruby runtime, RubyClass exceptionClass, String msg, IRubyObject backtrace) Construct a new throwable RaiseException appropriate for the target Ruby exception class.static RaiseExceptionfrom(Ruby runtime, RubyClass exceptionClass, IRubyObject... args) Construct a new throwable RaiseException appropriate for the target Ruby exception class.getCause()final RubyExceptionGets the exceptionstatic StackTraceElement[]protected final voidsetException(RubyException newException) Sets the exceptionprotected final voidsetException(RubyException newException, boolean unused) Deprecated.Methods inherited from class org.jruby.exceptions.JumpException
originalFillInStackTraceMethods inherited from class java.lang.Throwable
addSuppressed, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RaiseException
-
RaiseException
Deprecated. -
RaiseException
Deprecated. -
RaiseException
Deprecated. -
RaiseException
Deprecated. -
RaiseException
Deprecated. -
RaiseException
@Deprecated public RaiseException(Ruby runtime, RubyClass exceptionClass, String msg, boolean unused) Deprecated. -
RaiseException
@Deprecated public RaiseException(Ruby runtime, RubyClass exceptionClass, String msg, IRubyObject backtrace) Deprecated. -
RaiseException
@Deprecated public RaiseException(Ruby runtime, RubyClass exceptionClass, String msg, IRubyObject backtrace, boolean unused) Deprecated.
-
-
Method Details
-
fillInStackTrace
Description copied from class:JumpExceptionThis method don't do anything for performance reasons.- Overrides:
fillInStackTracein classJumpException- See Also:
-
from
Construct a new throwable RaiseException appropriate for the target Ruby exception class. Note that this will produce a RaiseException that has fully prepared for being thrown, including:- Populating the stack trace based on the current thread
- Setting the cause to any currently in-flight exception
- Setting the thread-local $! "error info" to this exception
- Parameters:
runtime- the current JRuby runtimeexceptionClass- the class of the exception to construct and raisemsg- a simple message for the exception- Returns:
- a RaiseException instance appropriate for the target Ruby exception class
-
from
public static RaiseException from(Ruby runtime, RubyClass exceptionClass, String msg, IRubyObject backtrace) Construct a new throwable RaiseException appropriate for the target Ruby exception class.- Parameters:
runtime- the current JRuby runtimeexceptionClass- the class of the exception to construct and raisemsg- a simple message for the exceptionbacktrace- a Ruby object (usually an Array) to use for the exception's backtrace- Returns:
- a RaiseException instance appropriate for the target Ruby exception class
-
from
Construct a new throwable RaiseException appropriate for the target Ruby exception class.- Parameters:
runtime- the current JRuby runtimeexceptionClass- the class of the exception to construct and raiseargs- the arguments for the exception's constructor- Returns:
- a RaiseException instance appropriate for the target Ruby exception class
-
from
Construct a new throwable RaiseException appropriate for the target Ruby exception class.- Parameters:
runtime- the current JRuby runtimeexceptionPath- a string representing the fully-qualified constant path to look up the exceptionmsg- a simple message for the exception- Returns:
- a RaiseException instance appropriate for the target Ruby exception class
-
from
public static RaiseException from(Ruby runtime, String exceptionPath, String msg, IRubyObject backtrace) Construct a new throwable RaiseException appropriate for the target Ruby exception class.- Parameters:
runtime- the current JRuby runtimeexceptionPath- a string representing the fully-qualified constant path to look up the exceptionmsg- a simple message for the exceptionbacktrace- a Ruby object (usually an Array) to use for the exception's backtrace- Returns:
- a RaiseException instance appropriate for the target Ruby exception class
-
from
Construct a new throwable RaiseException appropriate for the target Ruby exception class.- Parameters:
runtime- the current JRuby runtimeString exceptionPathargs- the arguments for the exception's constructor- Returns:
- a RaiseException instance appropriate for the target Ruby exception class
-
getMessage
- Overrides:
getMessagein classThrowable
-
getCause
-
getException
Gets the exception- Returns:
- Returns a RubyException
-
setException
Sets the exception- Parameters:
newException- The exception to set
-
javaTraceFromRubyTrace
-
createNativeRaiseException
Deprecated. -
createNativeRaiseException
@Deprecated public static RaiseException createNativeRaiseException(Ruby runtime, Throwable cause, Member target) Deprecated. -
setException
Deprecated. -
from
Deprecated.
-