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
public class JDOException extends RuntimeException
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JDOException()Creates 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFailedObject(Object o)The exception may need to add objects to an array of failed objects.Object[]getFailedObjectArray()The exception may include an array of failed objects.ExceptiongetNestedException()The exception may have been caused by an Exception in the runtime.voidprintStackTrace()Prints thisJDOExceptionand its backtrace to the standard error output.voidprintStackTrace(PrintStream s)Prints thisJDOExceptionand its backtrace to the specified print stream.voidprintStackTrace(PrintWriter s)Prints thisJDOExceptionand its backtrace to the specified print writer.StringtoString()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 Detail
-
JDOException
public JDOException()
Creates a newJDOExceptionwithout detail message.
-
JDOException
public JDOException(String msg)
Constructs a newJDOExceptionwith the specified detail message.- Parameters:
msg- the detail message.
-
JDOException
public JDOException(String msg, Exception nested)
Constructs a newJDOExceptionwith the specified detail message and nested Exception.- Parameters:
msg- the detail message.nested- the nestedException.
-
JDOException
public JDOException(String msg, Object[] failed)
Constructs a newJDOExceptionwith the specified detail message and failed object array.- Parameters:
msg- the detail message.failed- the failed object array.
-
-
Method Detail
-
addFailedObject
public void addFailedObject(Object o)
The exception may need to add objects to an array of failed objects.- Parameters:
o- the failed object to add to an array.
-
getFailedObjectArray
public Object[] getFailedObjectArray()
The exception may include an array of failed objects.- Returns:
- the failed object array.
-
getNestedException
public Exception getNestedException()
The exception may have been caused by an Exception in the runtime.- Returns:
- the nested Exception.
-
toString
public String 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
public void printStackTrace(PrintStream s)
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
public void printStackTrace(PrintWriter s)
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
-
-