com.sun.jdo.api.persistence.support
Class JDOException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by 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
JDOException()
          Creates a new JDOException without detail message.
JDOException(String msg)
          Constructs a new JDOException with the specified detail message.
JDOException(String msg, Exception nested)
          Constructs a new JDOException with the specified detail message and nested Exception.
JDOException(String msg, Exception nested, Object[] failed)
          Constructs a new JDOException with the specified detail message, nested exception, and failed object array.
JDOException(String msg, Object[] failed)
          Constructs a new JDOException with the specified detail message and failed object array.
 
Method Summary
 void addFailedObject(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.
 Exception getNestedException()
          The exception may have been caused by an Exception in the runtime.
 void printStackTrace()
          Prints this JDOException and its backtrace to the standard error output.
 void printStackTrace(PrintStream s)
          Prints this JDOException and its backtrace to the specified print stream.
 void printStackTrace(PrintWriter s)
          Prints this JDOException and its backtrace to the specified print writer.
 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).
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDOException

public JDOException()
Creates a new JDOException without detail message.


JDOException

public JDOException(String msg)
Constructs a new JDOException with the specified detail message.

Parameters:
msg - the detail message.

JDOException

public JDOException(String msg,
                    Exception nested)
Constructs a new JDOException with the specified detail message and nested Exception.

Parameters:
msg - the detail message.
nested - the nested Exception.

JDOException

public JDOException(String msg,
                    Object[] failed)
Constructs a new JDOException with the specified detail message and failed object array.

Parameters:
msg - the detail message.
failed - the failed object array.

JDOException

public JDOException(String msg,
                    Exception nested,
                    Object[] failed)
Constructs a new JDOException with the specified detail message, nested exception, and failed object array.

Parameters:
msg - the detail message.
nested - the nested Exception.
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).

Overrides:
toString in class Throwable
Returns:
the String.

printStackTrace

public void printStackTrace()
Prints this JDOException and its backtrace to the standard error output. Prints nested Throwables' stack trace as well.

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintStream s)
Prints this JDOException and its backtrace to the specified print stream. Prints nested Throwable's stack trace as well.

Overrides:
printStackTrace in class Throwable
Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(PrintWriter s)
Prints this JDOException and its backtrace to the specified print writer. Prints nested Throwable's stack trace as well.

Overrides:
printStackTrace in class Throwable
Parameters:
s - PrintWriter to use for output


Copyright © 2012. All Rights Reserved.