org.jruby.exceptions
Class RaiseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.jruby.exceptions.JumpException
                  extended by org.jruby.exceptions.RaiseException
All Implemented Interfaces:
java.io.Serializable

public class RaiseException
extends JumpException

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jruby.exceptions.JumpException
JumpException.BreakJump, JumpException.FlowControlException, JumpException.NextJump, JumpException.RedoJump, JumpException.RetryJump, JumpException.ReturnJump, JumpException.SpecialJump
 
Field Summary
static boolean DEBUG
           
 
Fields inherited from class org.jruby.exceptions.JumpException
REDO_JUMP, RETRY_JUMP, SPECIAL_JUMP
 
Constructor Summary
RaiseException(RubyException actException)
          Construct a new RaiseException to wrap the given Ruby exception for Java-land throwing purposes.
RaiseException(RubyException exception, boolean isNativeException)
           
RaiseException(RubyException exception, IRubyObject backtrace)
          Construct a new RaiseException to wrap the given Ruby exception for Java-land throwing purposes.
RaiseException(Ruby runtime, RubyClass excptnClass, java.lang.String msg, boolean nativeException)
           
RaiseException(Ruby runtime, RubyClass excptnClass, java.lang.String msg, IRubyObject backtrace, boolean nativeException)
           
RaiseException(java.lang.Throwable cause, NativeException nativeException)
           
 
Method Summary
static RaiseException createNativeRaiseException(Ruby runtime, java.lang.Throwable cause)
          Method still in use by jruby-openssl <= 0.5.2
static RaiseException createNativeRaiseException(Ruby runtime, java.lang.Throwable cause, java.lang.reflect.Member target)
           
 RubyException getException()
          Gets the exception
 java.lang.String getMessage()
           
 java.lang.StackTraceElement[] getStackTrace()
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream ps)
           
 void printStackTrace(java.io.PrintWriter pw)
           
protected  void setException(RubyException newException, boolean nativeException)
          Sets the exception
 
Methods inherited from class org.jruby.exceptions.JumpException
fillInStackTrace, originalFillInStackTrace
 
Methods inherited from class java.lang.Throwable
getCause, getLocalizedMessage, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

RaiseException

public RaiseException(RubyException actException)
Construct a new RaiseException to wrap the given Ruby exception for Java-land throwing purposes. This constructor will generate a backtrace using the Java stack trace and the interpreted Ruby frames for the current thread.

Parameters:
actException - The Ruby exception to wrap

RaiseException

public RaiseException(RubyException exception,
                      IRubyObject 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

Parameters:
exception - The Ruby exception to wrap
backtrace -

RaiseException

public RaiseException(Ruby runtime,
                      RubyClass excptnClass,
                      java.lang.String msg,
                      boolean nativeException)

RaiseException

public RaiseException(Ruby runtime,
                      RubyClass excptnClass,
                      java.lang.String msg,
                      IRubyObject backtrace,
                      boolean nativeException)

RaiseException

public RaiseException(RubyException exception,
                      boolean isNativeException)

RaiseException

public RaiseException(java.lang.Throwable cause,
                      NativeException nativeException)
Method Detail

createNativeRaiseException

public static RaiseException createNativeRaiseException(Ruby runtime,
                                                        java.lang.Throwable cause)
Method still in use by jruby-openssl <= 0.5.2


createNativeRaiseException

public static RaiseException createNativeRaiseException(Ruby runtime,
                                                        java.lang.Throwable cause,
                                                        java.lang.reflect.Member target)

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getException

public RubyException getException()
Gets the exception

Returns:
Returns a RubyException

getStackTrace

public java.lang.StackTraceElement[] getStackTrace()
Overrides:
getStackTrace in class java.lang.Throwable

setException

protected void setException(RubyException newException,
                            boolean nativeException)
Sets the exception

Parameters:
newException - The exception to set

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Overrides:
printStackTrace in class java.lang.Throwable


Copyright © 2002-2009 JRuby Team. All Rights Reserved.