org.objectweb.kilim
Class InternalException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.objectweb.kilim.InternalException
All Implemented Interfaces:
java.io.Serializable

public class InternalException
extends java.lang.RuntimeException

InternalException is the exception generated inthe Kilim environment in case of an abnormal behviour of the Kilim infrastructure. (a user error is notified through a KilimException). InternalException provides a simple mechanism to wrap exceptions of an other type so that the stack trace and the message returned by such an exception correspond to that of the wrapped exception.

Author:
dumant
See Also:
Serialized Form

Field Summary
private  java.lang.Throwable actual
           
 
Fields inherited from class java.lang.RuntimeException
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
InternalException()
          Constructs a new InternalException with no detail message.
InternalException(java.lang.String s)
          Constructs a new InternalException with a detail message.
InternalException(java.lang.Throwable throwable)
          Builds an InternalException that wraps another exception.
 
Method Summary
 java.lang.String getMessage()
          Returns the detail message of this InternalException.
 void printStackTrace()
          Prints this InternalException and its backtrace to the standard error stream.
 void printStackTrace(java.io.PrintStream s)
          Prints this InternalException 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.Throwable represents()
          Returns the exception wrapped by this InternalException.
 java.lang.String toString()
          Returns a short description of this InternalException.
 
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
 

Field Detail

actual

private java.lang.Throwable actual
Constructor Detail

InternalException

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


InternalException

public InternalException(java.lang.String s)
Constructs a new InternalException with a detail message.

Parameters:
s - : string corresponding to the exception message

InternalException

public InternalException(java.lang.Throwable throwable)
Builds an InternalException that wraps another exception.

Parameters:
throwable - : the exception to be encapsulated.
Method Detail

getMessage

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

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

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

toString

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

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

Returns:
a string representation of this 'InternalException'.

printStackTrace

public void printStackTrace()
Prints this InternalException 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(java.io.PrintStream s)
Prints this InternalException 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(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.

Parameters:
s - the print writer.

represents

public java.lang.Throwable represents()
Returns the exception wrapped by this InternalException. If this exception doesn't wrap any other exception, it returns itself.

Returns:
the represented exception.