148 JDO exceptions 9.2.1 JDOException This is the base class for all JDO exceptions. It extends java.lang.Runtime Exception so instances of this and all its subclasses do not have to be explicitly caught by the application. When instantiated, the JDOException is given a descriptive string, an optional nested exception, and an optional failed object. All three of these can be accessed by the application if the exception is caught. 9.2.1.1 JDOException constructors The constructors for JDOException are shown below, and equivalent constructors exist for every exception in the hierarchy. These are relevant to developers as it is occasionally necessary to throw instances of JDO exceptions from within persistence-capable objects. An example of this would be the use of the InstanceCallbacks interface to prevent an instance from being deleted in certain circumstances. The jdoPreDelete() method would throw a JDOUserException if deletion were to be prevented. Such an example has already been presented in Section 4.6. JDOException() This constructor takes no arguments. JDOException(String msg) This constructor takes a String message only. JDOException(String msg, Throwable[] nested) This constructor takes a message and an array of nested exceptions. JDOException(String msg, Throwable nested) This constructor takes a message and a single nested exception (which itself might contain further nested exceptions as necessary). JDOException(String msg, Object failed) This constructor takes a message and a reference to the failed object. JDOException(String msg, Throwable[] nested, Object failed) This constructor takes a message, an array of nested exceptions, and a reference to the failed object . JDOException(String msg, Throwable nested, Object failed) This constructor takes a message, a single nested exception, and a reference to the failed object.
Note: If you are looking for good and high quality web space to host and run your java application check Vision java hosting services