org.enhydra.zeus
Class ZeusException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.enhydra.zeus.ZeusException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
IllegalOutputDirectoryException, InvalidCollectionTypeException, TransformerException, UnsupportedBindingTypeException, UnsupportedSchemaTypeException

public class ZeusException
extends java.lang.Exception

ZeusException is the top level Exception that Zeus classes can throw. It's subclasses add specificity to the problems that can occur using Zeus, but this single Exception can be caught to handle all Zeus specific problems.

Author:
Brett McLaughlin
See Also:
Serialized Form

Field Summary
protected  java.lang.Throwable cause
          A wrapped Throwable
 
Constructor Summary
ZeusException()
           This will create an Exception.
ZeusException(java.lang.String message)
           This will create an Exception with the given message.
ZeusException(java.lang.String message, java.lang.Throwable cause)
           This will create an Exception with the given message and wrap another Exception.
 
Method Summary
 java.lang.Throwable getCause()
           This will return the root cause Throwable, or null if one does not exist.
 java.lang.String getMessage()
           This returns the message for the Exception.
 java.lang.Throwable initCause(java.lang.Throwable cause)
           Intializes the cause of this exception to be the specified value.
 void printStackTrace()
           This prints the stack trace of the Exception.
 void printStackTrace(java.io.PrintStream s)
           This prints the stack trace of the Exception to the given PrintStream.
 void printStackTrace(java.io.PrintWriter w)
           This prints the stack trace of the Exception to the given PrintWriter.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cause

protected java.lang.Throwable cause
A wrapped Throwable
Constructor Detail

ZeusException

public ZeusException()

This will create an Exception.


ZeusException

public ZeusException(java.lang.String message)

This will create an Exception with the given message.

Parameters:
message - String message indicating the problem that occurred.

ZeusException

public ZeusException(java.lang.String message,
                     java.lang.Throwable cause)

This will create an Exception with the given message and wrap another Exception. This is useful when the originating Exception should be held on to.

Parameters:
message - String message indicating the problem that occurred.
cause - Throwable that caused this to be thrown.
Method Detail

initCause

public java.lang.Throwable initCause(java.lang.Throwable cause)

Intializes the cause of this exception to be the specified value.

Parameters:
cause - Throwable that caused this to be thrown.

getMessage

public java.lang.String getMessage()

This returns the message for the Exception. If there are one or more nested exceptions, their messages are appended.

Overrides:
getMessage in class java.lang.Throwable
Returns:
String - message for Exception.

printStackTrace

public void printStackTrace()

This prints the stack trace of the Exception. If there is a root cause, the stack trace of the root Exception is printed right after.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)

This prints the stack trace of the Exception to the given PrintStream. If there is a root cause, the stack trace of the root Exception is printed right after.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter w)

This prints the stack trace of the Exception to the given PrintWriter. If there is a root cause, the stack trace of the root Exception is printed right after.

Overrides:
printStackTrace in class java.lang.Throwable

getCause

public java.lang.Throwable getCause()

This will return the root cause Throwable, or null if one does not exist.

Returns:
Throwable - the wrapped Throwable.


Copyright © 2002 Enhydra. All Rights Reserved.