JDOMException (JDOM v1.1.3)
Keywords: org.jdom.JDOMException class

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

## org.jdom
Class JDOMException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              org.jdom.JDOMException

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  DataConversionException, JDOMParseException, XSLTransformException

    public class JDOMException

extends java.lang.Exception

The top level exception that JDOM classes can throw. Its subclasses add specificity to the problems that can occur using JDOM. This single exception can be caught to handle all JDOM specific problems (some methods may throw `IOException` and such).

Version:
  $Revision: 1.26 $, $Date: 2008/12/10 00:59:51 $
Author:
  Brett McLaughlin, Jason Hunter
See Also:
  Serialized Form

Constructor Summary
`JDOMException()` This will create an `Exception`.
`JDOMException(java.lang.String message)` This will create an `Exception` with the given message.
`JDOMException(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)` Prints the stack trace of the `Exception` to the given PrintStream.
`void` | `printStackTrace(java.io.PrintWriter w)` Prints the stack trace of the `Exception` to the given PrintWriter.

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JDOMException

    public JDOMException()

  This will create an `Exception`.

### JDOMException

    public JDOMException(java.lang.String message)

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

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

### JDOMException

    public JDOMException(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.

  Overrides:
    `initCause` in class `java.lang.Throwable`
  Parameters:
    `cause` - `Throwable` that caused this to be thrown.
  Returns:
    a pointer to this throwable

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

  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`
  Parameters:
    `s` - PrintStream to print to

### printStackTrace

    public void printStackTrace(java.io.PrintWriter w)

  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`
  Parameters:
    `w` - PrintWriter to print to

### getCause

    public java.lang.Throwable getCause()

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

  Overrides:
    `getCause` in class `java.lang.Throwable`
  Returns:
    `Throwable` - the wrapped `Throwable`.

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

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