org.objectweb.kilim
Class KilimException

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

public class KilimException
extends java.lang.Exception

KilimException is the exception generated inthe Kilim environment to notify the user error (bugs in Kilim implementation are notified through Internal exceptions). KilimException 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:
horn
See Also:
Serialized Form

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

encapsulated

private java.lang.Exception encapsulated
Constructor Detail

KilimException

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


KilimException

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

Parameters:
s - : a string to be used as a message

KilimException

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

Parameters:
exception - : an exception to be wrapped.
Method Detail

getMessage

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

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

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

toString

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

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

Returns:
a string representation of this 'KilimException'.

printStackTrace

public void printStackTrace()
Prints this KilimException 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 KilimException 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.Exception represents()
Returns the exception wrapped by this KilimException.

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

Returns:
the represented exception.