public class JDOException
extends java.lang.RuntimeException
Throwable
array and an optional failed object.Modifier and Type | Field and Description |
---|---|
(package private) java.lang.Object |
failed
This exception may be the result of incorrect parameters supplied
to an API.
|
private boolean |
inPrintStackTrace
Flag indicating whether printStackTrace is being executed.
|
private static I18NHelper |
msg
The Internationalization message helper.
|
(package private) java.lang.Throwable[] |
nested
This exception was generated because of an exception in the runtime library.
|
Constructor and Description |
---|
JDOException()
Constructs a new
JDOException without a detail message. |
JDOException(java.lang.String msg)
Constructs a new
JDOException with the specified detail message. |
JDOException(java.lang.String msg,
java.lang.Object failed)
Constructs a new
JDOException with the specified detail message
and failed object. |
JDOException(java.lang.String msg,
java.lang.Throwable nested)
Constructs a new
JDOException with the specified detail message
and nested Throwable . |
JDOException(java.lang.String msg,
java.lang.Throwable[] nested)
Constructs a new
JDOException with the specified detail message
and nested Throwable s. |
JDOException(java.lang.String msg,
java.lang.Throwable[] nested,
java.lang.Object failed)
Constructs a new
JDOException with the specified detail message,
nested Throwable s, and failed object. |
JDOException(java.lang.String msg,
java.lang.Throwable nested,
java.lang.Object failed)
Constructs a new
JDOException with the specified detail message,
nested Throwable , and failed object. |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
exceptionToString(java.lang.Exception ex)
Helper method returning a short description of the exception passed
as an argument.
|
java.lang.Throwable |
getCause()
Often there is only one nested exception, and this method returns it.
|
java.lang.Object |
getFailedObject()
The exception may include a failed object.
|
java.lang.Throwable[] |
getNestedExceptions()
The exception may have been caused by multiple exceptions in the runtime.
|
java.lang.Throwable |
initCause(java.lang.Throwable cause)
JDK 1.4 includes a new chaining mechanism for Throwable, but since
JDO has its own "legacy" chaining mechanism, the "standard" mechanism
cannot be used.
|
void |
printStackTrace()
Prints this
JDOException and its backtrace to the
standard error output. |
void |
printStackTrace(java.io.PrintStream s)
Prints this
JDOException and its backtrace to the
specified print stream. |
void |
printStackTrace(java.io.PrintWriter s)
Prints this
JDOException and its backtrace to the specified
print writer. |
java.lang.String |
toString()
The
String representation includes the name of the class,
the descriptive comment (if any),
the String representation of the failed Object (if any),
and the String representation of the nested Throwable s (if any). |
java.lang.Throwable[] nested
java.lang.Object failed
private static I18NHelper msg
private boolean inPrintStackTrace
public JDOException()
JDOException
without a detail message.public JDOException(java.lang.String msg)
JDOException
with the specified detail message.msg
- the detail message.public JDOException(java.lang.String msg, java.lang.Throwable[] nested)
JDOException
with the specified detail message
and nested Throwable
s.msg
- the detail message.nested
- the nested Throwable[]
.public JDOException(java.lang.String msg, java.lang.Throwable nested)
JDOException
with the specified detail message
and nested Throwable
.msg
- the detail message.nested
- the nested Throwable
.public JDOException(java.lang.String msg, java.lang.Object failed)
JDOException
with the specified detail message
and failed object.msg
- the detail message.failed
- the failed object.public JDOException(java.lang.String msg, java.lang.Throwable[] nested, java.lang.Object failed)
JDOException
with the specified detail message,
nested Throwable
s, and failed object.msg
- the detail message.nested
- the nested Throwable[]
.failed
- the failed object.public JDOException(java.lang.String msg, java.lang.Throwable nested, java.lang.Object failed)
JDOException
with the specified detail message,
nested Throwable
, and failed object.msg
- the detail message.nested
- the nested Throwable
.failed
- the failed object.public java.lang.Object getFailedObject()
public java.lang.Throwable[] getNestedExceptions()
Exception
.public java.lang.Throwable getCause()
getCause
in class java.lang.Throwable
public java.lang.Throwable initCause(java.lang.Throwable cause)
initCause
in class java.lang.Throwable
cause
- ignored.public java.lang.String toString()
String
representation includes the name of the class,
the descriptive comment (if any),
the String
representation of the failed Object
(if any),
and the String
representation of the nested Throwable
s (if any).toString
in class java.lang.Throwable
String
.public void printStackTrace()
JDOException
and its backtrace to the
standard error output.
Print nested Throwables' stack trace as well.printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream s)
JDOException
and its backtrace to the
specified print stream.
Print nested Throwables' stack trace as well.printStackTrace
in class java.lang.Throwable
s
- PrintStream
to use for outputpublic void printStackTrace(java.io.PrintWriter s)
JDOException
and its backtrace to the specified
print writer.
Print nested Throwables' stack trace as well.printStackTrace
in class java.lang.Throwable
s
- PrintWriter
to use for outputprivate static java.lang.String exceptionToString(java.lang.Exception ex)
ex
- the exception to be represented.