WriteAbortedExceptionpublic class WriteAbortedException extends ObjectStreamException Signals that the {@link ObjectInputStream#readObject()} method has detected
an exception marker in the input stream. This marker indicates that exception
occurred when the object was serialized, and this marker was inserted instead
of the original object. It is a way to "propagate" an exception from the code
that attempted to write the object to the code that is attempting to read the
object. |
Fields Summary |
---|
private static final long | serialVersionUID | public Exception | detailThe exception that occured when writeObject() was attempting to serialize
the object. |
Constructors Summary |
---|
public WriteAbortedException(String detailMessage, Exception rootCause)Constructs a new {@code WriteAbortedException} with its stack trace,
detail message and the exception which caused the underlying problem when
serializing the object filled in.
super(detailMessage);
detail = rootCause;
initCause(rootCause);
|
Methods Summary |
---|
public java.lang.Throwable | getCause()Gets the cause of this exception or {@code null} if there is no cause.
return detail;
| public java.lang.String | getMessage()Gets the extra information message which was provided when this exception
was created. Returns {@code null} if no message was provided at creation
time.
String msg = super.getMessage();
if (detail != null) {
msg = msg + "; " + detail.toString(); //$NON-NLS-1$
}
return msg;
|
|