public class SODOMException
extends java.lang.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.
Modifier and Type | Field and Description |
---|---|
protected java.lang.Throwable |
cause
A wrapped
Throwable |
Constructor and Description |
---|
SODOMException()
This will create an
Exception . |
SODOMException(java.lang.String message)
This will create an
Exception with the given message. |
SODOMException(java.lang.String message,
java.lang.Throwable cause)
This will create an
Exception with the given message
and wrap another Exception . |
Modifier and Type | Method and Description |
---|---|
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. |
public SODOMException()
This will create an Exception
.
public SODOMException(java.lang.String message)
This will create an Exception
with the given message.
message
- String
message indicating
the problem that occurred.public SODOMException(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.
message
- String
message indicating
the problem that occurred.cause
- Throwable
that caused this
to be thrown.public java.lang.Throwable initCause(java.lang.Throwable cause)
Intializes the cause of this exception to be the specified value.
initCause
in class java.lang.Throwable
cause
- Throwable
that caused this
to be thrown.public java.lang.String getMessage()
This returns the message for the Exception
. If
there are one or more nested exceptions, their messages
are appended.
getMessage
in class java.lang.Throwable
String
- message for Exception
.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.
printStackTrace
in class java.lang.Throwable
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.
printStackTrace
in class java.lang.Throwable
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.
printStackTrace
in class java.lang.Throwable
public java.lang.Throwable getCause()
This will return the root cause Throwable
, or null
if one does not exist.
getCause
in class java.lang.Throwable
Throwable
- the wrapped Throwable
.Copyright (c) 2017 Software AG. All Rights Reserved.