Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdom
Class JDOMException

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

Direct Known Subclasses:
  DataConversionException

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:
  1.0
Author:
  Brett McLaughlin, Jason Hunter
See Also:
  Serialized Form

Field Summary
`protected Throwable` | `cause` A wrapped `Throwable`

Constructor Summary
`JDOMException()` This will create an `Exception`.
`JDOMException(String message)` This will create an `Exception` with the given message.
`JDOMException(String message, Throwable cause)` This will create an `Exception` with the given message and wrap another `Exception`.

Method Summary
`Throwable` | `getCause()` This will return the root cause `Throwable`, or null if one does not exist.
`String` | `getMessage()` This returns the message for the `Exception`.
`Throwable` | `getRootCause()` Deprecated. Deprecated in beta7, use getCause() instead which follows the JDK 1.4 naming convention
`void` | `printStackTrace()` This prints the stack trace of the `Exception`.
`void` | `printStackTrace(PrintStream s)` This prints the stack trace of the `Exception` to the given PrintStream.
`void` | `printStackTrace(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 Throwable cause

  A wrapped `Throwable`

Constructor Detail

### JDOMException

    public JDOMException()

  This will create an `Exception`.

### JDOMException

    public JDOMException(String message)

  This will create an `Exception` with the given message.

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

### 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.
    `exception` - `Exception` that caused this to be thrown.

Method Detail

### getMessage

    public String getMessage()

  This returns the message for the `Exception`. If there is a root cause, the message associated with the root `Exception` is appended.

  Overrides:
    getMessage in class 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 Throwable

### 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

### 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

### getCause

    public Throwable getCause()

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

  Returns:
    `Throwable` - the wrapped `Throwable`.

### getRootCause

    public Throwable getRootCause()

  Deprecated. Deprecated in beta7, use getCause() instead which follows the JDK 1.4 naming convention

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

  Returns:
    `Throwable` - the wrapped `Throwable`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Jason Hunter, Brett McLaughlin. All Rights Reserved.