org.objectweb.jonathan.apis.kernel
Class JonathanException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.objectweb.jonathan.apis.kernel.JonathanException
All Implemented Interfaces:
java.io.Serializable

public class JonathanException
extends java.lang.Exception

JonathanException is the supertype of all Jonathan exceptions. It includes a mechanism to wrap exceptions of an other type so that the stack trace and the message returned by a Jonathan exception correspond to that of the wrapped exception.

See Also:
Serialized Form

Constructor Summary
JonathanException()
          Constructs a new JonathanException with no detail message.
JonathanException(java.lang.Exception exception)
          Builds a JonathanException that wraps another exception.
JonathanException(java.lang.String s)
          Builds a JonathanException with a detail message.
 
Method Summary
 java.lang.String getMessage()
          Returns the detail message of this JonathanException.
 void printStackTrace()
          Prints this JonathanException and its backtrace to the standard error stream.
 void printStackTrace(java.io.PrintStream s)
          Prints this JonathanException and its backtrace to the specified print stream.
 void printStackTrace(java.io.PrintWriter s)
          Prints this 'Throwable' and its backtrace to the specified print writer.
 java.lang.Exception represents()
          Returns the exception wrapped by this JonathanException.
 java.lang.String toString()
          Returns a short description of this JonathanException.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JonathanException

public JonathanException()
Constructs a new JonathanException with no detail message.


JonathanException

public JonathanException(java.lang.String s)
Builds a JonathanException with a detail message.


JonathanException

public JonathanException(java.lang.Exception exception)
Builds a JonathanException that wraps another exception.

Method Detail

getMessage

public java.lang.String getMessage()
Returns the detail message of this JonathanException.

If this exception represents another exception, the returned message is that of the represented exception.

Overrides:
getMessage in class java.lang.Throwable
Returns:
the detail message of this 'JonathanException', or 'null' if this 'JonathanException' does not have a detail message.

toString

public java.lang.String toString()
Returns a short description of this JonathanException.

If this exception represents another exception, the returned description is that of the represented exception.

Overrides:
toString in class java.lang.Throwable
Returns:
a string representation of this 'JonathanException'.

printStackTrace

public void printStackTrace()
Prints this JonathanException and its backtrace to the standard error stream.

If this exception represents another exception, the printed description and backtrace are that of the represented exception.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints this JonathanException and its backtrace to the specified print stream.

If this exception represents another exception, the printed description and backtrace are that of the represented exception.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - the print stream.

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Prints this 'Throwable' and its backtrace to the specified print writer.

If this exception represents another exception, the printed description and backtrace are that of the represented exception.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - the print writer.

represents

public java.lang.Exception represents()
Returns the exception wrapped by this JonathanException.

If this exception doesn't wrap any other exception, it returns itself.

Returns:
the represented exception.