com.yahoo.java
Class ExtendedError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by com.yahoo.java.ExtendedError
All Implemented Interfaces:
Serializable

public class ExtendedError
extends Error

Extension of the java.lang.Error class to provide the Java 1.4 embedded cause functionality on platforms that don't already provide it.

Author:
Ryan Kennedy
See Also:
Serialized Form

Constructor Summary
ExtendedError(String message, Throwable cause)
          Constructs an error with an underlying cause and a message
ExtendedError(Throwable cause)
          Constructs an error with an underlying cause.
 
Method Summary
 void printStackTrace()
          Implements printStackTrace so that it prints the stack trace for both this error and the underyling cause, if there is one.
 void printStackTrace(PrintStream s)
          Implements printStackTrace so that it prints the stack trace for both this error and the underyling cause, if there is one.
 void printStackTrace(PrintWriter s)
          Implements printStackTrace so that it prints the stack trace for both this error and the underyling cause, if there is one.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedError

public ExtendedError(Throwable cause)
Constructs an error with an underlying cause.

Parameters:
cause - The underlying cause of the error.

ExtendedError

public ExtendedError(String message,
                     Throwable cause)
Constructs an error with an underlying cause and a message

Parameters:
message - The message of the error.
cause - The underlying cause of the error.
Method Detail

printStackTrace

public void printStackTrace()
Implements printStackTrace so that it prints the stack trace for both this error and the underyling cause, if there is one.

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintStream s)
Implements printStackTrace so that it prints the stack trace for both this error and the underyling cause, if there is one.

Overrides:
printStackTrace in class Throwable
Parameters:
s - The print stream to print the stack trace to.

printStackTrace

public void printStackTrace(PrintWriter s)
Implements printStackTrace so that it prints the stack trace for both this error and the underyling cause, if there is one.

Overrides:
printStackTrace in class Throwable
Parameters:
s - The print writer to write the stack trace to.