Class JDOException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.sun.jdo.api.persistence.support.JDOException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
JDOCanRetryException,JDOFatalException
This is the root of all JDO Exceptions. It contains an optional
nested Exception and an optional message.
- Version:
- 0.1
- Author:
- Craig Russell
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newJDOExceptionwithout detail message.JDOException(String msg) Constructs a newJDOExceptionwith the specified detail message.JDOException(String msg, Exception nested) Constructs a newJDOExceptionwith the specified detail message and nested Exception.JDOException(String msg, Exception nested, Object[] failed) Constructs a newJDOExceptionwith the specified detail message, nested exception, and failed object array.JDOException(String msg, Object[] failed) Constructs a newJDOExceptionwith the specified detail message and failed object array. -
Method Summary
Modifier and TypeMethodDescriptionvoidThe exception may need to add objects to an array of failed objects.Object[]The exception may include an array of failed objects.The exception may have been caused by an Exception in the runtime.voidPrints thisJDOExceptionand its backtrace to the standard error output.voidPrints thisJDOExceptionand its backtrace to the specified print stream.voidPrints thisJDOExceptionand its backtrace to the specified print writer.toString()The String representation includes the name of the class, the descriptive comment (if any), the String representation of the nested Exception (if any), and the String representation of the failed Object array (if any).Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace
-
Constructor Details
-
JDOException
public JDOException()Creates a newJDOExceptionwithout detail message. -
JDOException
Constructs a newJDOExceptionwith the specified detail message.- Parameters:
msg- the detail message.
-
JDOException
Constructs a newJDOExceptionwith the specified detail message and nested Exception.- Parameters:
msg- the detail message.nested- the nestedException.
-
JDOException
Constructs a newJDOExceptionwith the specified detail message and failed object array.- Parameters:
msg- the detail message.failed- the failed object array.
-
JDOException
Constructs a newJDOExceptionwith the specified detail message, nested exception, and failed object array.- Parameters:
msg- the detail message.nested- the nestedException.failed- the failed object array.
-
-
Method Details
-
addFailedObject
The exception may need to add objects to an array of failed objects.- Parameters:
o- the failed object to add to an array.
-
getFailedObjectArray
The exception may include an array of failed objects.- Returns:
- the failed object array.
-
getNestedException
The exception may have been caused by an Exception in the runtime.- Returns:
- the nested Exception.
-
toString
The String representation includes the name of the class, the descriptive comment (if any), the String representation of the nested Exception (if any), and the String representation of the failed Object array (if any). -
printStackTrace
public void printStackTrace()Prints thisJDOExceptionand its backtrace to the standard error output. Prints nested Throwables' stack trace as well.- Overrides:
printStackTracein classThrowable
-
printStackTrace
Prints thisJDOExceptionand its backtrace to the specified print stream. Prints nested Throwable's stack trace as well.- Overrides:
printStackTracein classThrowable- Parameters:
s-PrintStreamto use for output
-
printStackTrace
Prints thisJDOExceptionand its backtrace to the specified print writer. Prints nested Throwable's stack trace as well.- Overrides:
printStackTracein classThrowable- Parameters:
s-PrintWriterto use for output
-