JDO Exception

JDOException

java.lang.Object
  ∟ java.lang.Throwable
    ∟ java.lang.Exception
      ∟ java.lang.RuntimeException
        ∟ javax.jdo.JDOException

This is the root of all JDO Exceptions. It contains an optional detail message, an optional nested Throwable array and an optional failed object.
Since:
JDO 1.0

Public Constructors

Constructs a new JDOException without a detail message.
Since:
JDO 1.0
JDOException(String msg)
Constructs a new JDOException with the specified detail message.
Parameters:
msg - the detail message.
Since:
JDO 1.0
JDOException(String msg, Object failed)
Constructs a new JDOException with the specified detail message and failed object.
Parameters:
msg - the detail message.
failed - the failed object.
Since:
JDO 1.0
JDOException(String msg, Throwable nested)
Constructs a new JDOException with the specified detail message and nested Throwable.
Parameters:
msg - the detail message.
nested - the nested Throwable.
Since:
JDO 1.0
JDOException(String msg, Throwable nested, Object failed)
Constructs a new JDOException with the specified detail message, nested Throwable, and failed object.
Parameters:
msg - the detail message.
nested - the nested Throwable.
failed - the failed object.
Since:
JDO 1.0
JDOException(String msg, Throwable[] nested)
Constructs a new JDOException with the specified detail message and nested Throwables.
Parameters:
msg - the detail message.
nested - the nested Throwable[].
Since:
JDO 1.0
JDOException(String msg, Throwable[] nested, Object failed)
Constructs a new JDOException with the specified detail message, nested Throwables, and failed object.
Parameters:
msg - the detail message.
nested - the nested Throwable[].
failed - the failed object.
Since:
JDO 1.0

Public Methods

Throwable getCause()
Often there is only one nested exception, and this method returns it.
If there are more than one, then this method returns the first nested exception. If there is no nested exception, then null is returned.
Return:
the first or only nested Throwable.
Since:
JDO 1.0
The exception may include a failed object.
Return:
the failed object.
Since:
JDO 1.0
Throwable[] getNestedExceptions()
The exception may have been caused by multiple exceptions in the runtime.
If multiple objects caused the problem, each failed object will have its own Exception.
Return:
the nested Throwable array.
Since:
JDO 1.0
Throwable initCause(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.
This method always throws a JDOFatalInternalException.
Parameters:
cause - ignored.
Return:
never.
Since:
JDO 1.0
Prints this JDOException and its backtrace to the standard error output.
Print nested Throwables' stack trace as well.
Since:
JDO 1.0
void printStackTrace(PrintStream s)
Prints this JDOException and its backtrace to the specified print stream.
Print nested Throwables' stack trace as well.
Parameters:
s - PrintStream to use for output
Since:
JDO 1.0
void printStackTrace(PrintWriter s)
Prints this JDOException and its backtrace to the specified print writer.
Print nested Throwables' stack trace as well.
Parameters:
s - PrintWriter to use for output
Since:
JDO 1.0
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 Throwables (if any).
Return:
the String.
Since:
JDO 1.0

Method inherited from class java.lang.Throwable

addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Method inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait