All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.jdom.JDOMException

java.lang.Object
   |
   +----java.lang.Throwable
           |
           +----java.lang.Exception
                   |
                   +----org.jdom.JDOMException

public class JDOMException
extends Exception
JDOMException

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

Version:
$Revision: 1.11 $, $Date: 2002/01/08 09:17:10 $
Author:
Brett McLaughlin, Jason Hunter

Variable Index

 o cause
A wrapped Throwable

Constructor Index

 o JDOMException()

This will create an Exception.

 o JDOMException(String)

This will create an Exception with the given message.

 o JDOMException(String, Throwable)

This will create an Exception with the given message and wrap another Exception.

Method Index

 o getCause()

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

 o getMessage()

This returns the message for the Exception.

 o initCause(Throwable)

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

 o printStackTrace()

This prints the stack trace of the Exception.

 o printStackTrace(PrintStream)

This prints the stack trace of the Exception to the given PrintStream.

 o printStackTrace(PrintWriter)

This prints the stack trace of the Exception to the given PrintWriter.

Variables

 o cause
 protected Throwable cause
A wrapped Throwable

Constructors

 o JDOMException
 public JDOMException()

This will create an Exception.

 o JDOMException
 public JDOMException(String message)

This will create an Exception with the given message.

Parameters:
message - String message indicating the problem that occurred.
 o JDOMException
 public JDOMException(String message,
                      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.

Methods

 o initCause
 public Throwable initCause(Throwable cause)

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

Parameters:
cause - Throwable that caused this to be thrown.
 o getMessage
 public String getMessage()

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

Returns:
String - message for Exception.
Overrides:
getMessage in class Throwable
 o 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 Throwable
 o printStackTrace
 public void printStackTrace(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 Throwable
 o printStackTrace
 public void printStackTrace(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 Throwable
 o getCause
 public Throwable getCause()

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

Returns:
Throwable - the wrapped Throwable.

All Packages  Class Hierarchy  This Package  Previous  Next  Index