org.enhydra.shark.api
Class RootError

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Error
          extended byorg.enhydra.shark.api.RootError
All Implemented Interfaces:
java.io.Serializable

public class RootError
extends java.lang.Error

This Error allows implementation of chain exceptions, and this implementation takes care if JDK1.3 or JDK1.4 is used.

Author:
Vladimir Puskas, Sasa Bojanic
See Also:
Serialized Form

Constructor Summary
RootError()
          Constructs a new exception with null as its detail message.
RootError(java.lang.String message)
          Constructs a new exception with the specified detail message.
RootError(java.lang.String message, java.lang.Throwable t)
          Constructs a new exception with the specified detail message and cause.
RootError(java.lang.Throwable t)
          Constructs a new exception with the specified cause.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the cause of this exception.
 java.lang.Throwable initCause(java.lang.Throwable t)
          Initializes the cause of this exception to the specified value.
 void printStackTrace()
          Method printStackTrace prints the stack trace to the standard error stream.
 void printStackTrace(java.io.PrintStream ps)
          Method printStackTrace prints the stack trace to the ps PrintStream.
 void printStackTrace(java.io.PrintWriter pw)
          Method printStackTrace prints the stack trace to the pw PrintWriter.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RootError

public RootError()
Constructs a new exception with null as its detail message.


RootError

public RootError(java.lang.String message)
Constructs a new exception with the specified detail message.

Parameters:
message - the detail message.

RootError

public RootError(java.lang.Throwable t)
Constructs a new exception with the specified cause.

Parameters:
t - the cause. A null value is permitted, and indicates that the cause is nonexistent or unknown.

RootError

public RootError(java.lang.String message,
                 java.lang.Throwable t)
Constructs a new exception with the specified detail message and cause.

Parameters:
message - the detail message.
t - the cause. A null value is permitted, and indicates that the cause is nonexistent or unknown.
Method Detail

initCause

public java.lang.Throwable initCause(java.lang.Throwable t)
                              throws java.lang.IllegalArgumentException,
                                     java.lang.IllegalStateException
Initializes the cause of this exception to the specified value.

Parameters:
t - the cause.
Returns:
a reference to this instance.
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

getCause

public java.lang.Throwable getCause()
Returns the cause of this exception.

Returns:
a cause for this exception if any, null otherwise

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Method printStackTrace prints the stack trace to the ps PrintStream.

Parameters:
ps - PrintStream used for the output.

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Method printStackTrace prints the stack trace to the pw PrintWriter.

Parameters:
pw - PrintWriter used for the output.

printStackTrace

public void printStackTrace()
Method printStackTrace prints the stack trace to the standard error stream.