Constructors Summary |
---|
public JDOException()Creates a new JDOException without detail message.
|
public JDOException(String msg)Constructs a new JDOException with the specified detail message.
super(msg);
|
public JDOException(String msg, Exception nested)Constructs a new JDOException with the specified detail message
and nested Exception.
super(msg);
this.nested = nested;
|
public JDOException(String msg, Object[] failed)Constructs a new JDOException with the specified detail message
and failed object array.
super(msg);
this.failed = failed;
|
public JDOException(String msg, Exception nested, Object[] failed)Constructs a new JDOException with the specified detail message,
nested exception, and failed object array.
super(msg);
this.nested = nested;
this.failed = failed;
|
Methods Summary |
---|
public void | addFailedObject(java.lang.Object o)The exception may need to add objects to an array of failed objects.
if (failed == null)
//Create new
failed = new Object[] {o};
else {
//Extend exisisting
int len = failed.length;
Object[] ofailed = failed;
failed = new Object[len + 1];
for (int i = 0; i < len; i++)
failed[i] = ofailed[i];
failed[len] = o;
}
|
public java.lang.Object[] | getFailedObjectArray()The exception may include an array of failed objects.
return failed;
|
public java.lang.Exception | getNestedException()The exception may have been caused by an Exception in the runtime.
return nested;
|
public void | printStackTrace()Prints this JDOException and its backtrace to the
standard error output.
Prints nested Throwables' stack trace as well.
printStackTrace(System.err);
|
public void | printStackTrace(java.io.PrintStream s)Prints this JDOException and its backtrace to the
specified print stream.
Prints nested Throwable's stack trace as well.
synchronized (s) {
super.printStackTrace(s);
if (nested != null) {
s.println("\nNestedStackTrace: "); //NOI18N
nested.printStackTrace(s);
}
}
|
public void | printStackTrace(java.io.PrintWriter s)Prints this JDOException and its backtrace to the specified
print writer.
Prints nested Throwable's stack trace as well.
synchronized (s) {
super.printStackTrace(s);
if (nested != null) {
s.println("\nNestedStackTrace: "); //NOI18N
nested.printStackTrace(s);
}
}
|
public java.lang.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).
int len = 0;
if (failed != null) {
len = failed.length;
}
// calculate approximate size of the String to return
StringBuffer sb = new StringBuffer (100 + 10 * len);
sb.append (super.toString());
// include nested exception information
if (nested != null) {
sb.append ("\nNestedException: "); //NOI18N
sb.append (nested.toString());
}
// include failed object information
if (len > 0) {
sb.append ("\nFailedObjectArray: ["); //NOI18N
Object ofail = failed[0];
sb.append (JDOHelper.printObject(ofail));
for (int i=1; i<len; ++i) {
sb.append (", "); //NOI18N
ofail = failed[i];
sb.append (JDOHelper.printObject(ofail));
}
sb.append ("]"); //NOI18N
}
return sb.toString();
|