org.objectweb.jonathan.apis.kernel

Class JonathanException


public class JonathanException
extends 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.

Constructor Summary

JonathanException()
Constructs a new JonathanException with no detail message.
JonathanException(Exception exception)
Builds a JonathanException that wraps another exception.
JonathanException(String s)
Builds a JonathanException with a detail message.

Method Summary

String
getMessage()
Returns the detail message of this JonathanException.
void
printStackTrace()
Prints this JonathanException and its backtrace to the standard error stream.
void
printStackTrace(PrintStream s)
Prints this JonathanException and its backtrace to the specified print stream.
void
printStackTrace(PrintWriter s)
Prints this 'Throwable' and its backtrace to the specified print writer.
Exception
represents()
Returns the exception wrapped by this JonathanException.
String
toString()
Returns a short description of this JonathanException.

Constructor Details

JonathanException

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


JonathanException

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


JonathanException

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

Method Details

getMessage

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

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

Returns:
the detail message of this 'JonathanException', or 'null' if this 'JonathanException' does not have a detail message.


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.


printStackTrace

public void printStackTrace(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.

Parameters:
s - the print stream.


printStackTrace

public void printStackTrace(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.

Parameters:
s - the print writer.


represents

public 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.


toString

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

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

Returns:
a string representation of this 'JonathanException'.