Package org.jdom
Class JDOMException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.jdom.JDOMException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DataConversionException,JDOMParseException,XSLTransformException
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:
-
Constructor Summary
ConstructorsConstructorDescriptionThis will create anException.JDOMException(String message) This will create anExceptionwith the given message.JDOMException(String message, Throwable cause) This will create anExceptionwith the given message and wrap anotherException. -
Method Summary
Modifier and TypeMethodDescriptiongetCause()This will return the root causeThrowable, or null if one does not exist.This returns the message for theException.Intializes the cause of this exception to be the specified value.voidThis prints the stack trace of theException.voidPrints the stack trace of theExceptionto the given PrintStream.voidPrints the stack trace of theExceptionto the given PrintWriter.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, setStackTrace, toString
-
Constructor Details
-
JDOMException
public JDOMException()This will create anException. -
JDOMException
This will create anExceptionwith the given message.- Parameters:
message-Stringmessage indicating the problem that occurred.
-
JDOMException
This will create anExceptionwith the given message and wrap anotherException. This is useful when the originatingExceptionshould be held on to.- Parameters:
message-Stringmessage indicating the problem that occurred.cause-Throwablethat caused this to be thrown.
-
-
Method Details
-
initCause
Intializes the cause of this exception to be the specified value. -
getMessage
This returns the message for theException. If there are one or more nested exceptions, their messages are appended.- Overrides:
getMessagein classThrowable- Returns:
String- message forException.
-
printStackTrace
public void printStackTrace()This prints the stack trace of theException. If there is a root cause, the stack trace of the rootExceptionis printed right after.- Overrides:
printStackTracein classThrowable
-
printStackTrace
Prints the stack trace of theExceptionto the given PrintStream. If there is a root cause, the stack trace of the rootExceptionis printed right after.- Overrides:
printStackTracein classThrowable- Parameters:
s- PrintStream to print to
-
printStackTrace
Prints the stack trace of theExceptionto the given PrintWriter. If there is a root cause, the stack trace of the rootExceptionis printed right after.- Overrides:
printStackTracein classThrowable- Parameters:
w- PrintWriter to print to
-
getCause
This will return the root causeThrowable, or null if one does not exist.
-