FileDocCategorySizeDatePackage
WriteAbortedException.javaAPI DocAndroid 1.5 API2975Wed May 06 22:41:04 BST 2009java.io

WriteAbortedException

public 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.
see
ObjectInputStream#readObject()
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
public Exception
detail
The 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.

param
detailMessage the detail message for this exception.
param
rootCause the exception that was thrown when serializing the object.
since
Android 1.0


                                                                               
         
        super(detailMessage);
        detail = rootCause;
        initCause(rootCause);
    
Methods Summary
public java.lang.ThrowablegetCause()
Gets the cause of this exception or {@code null} if there is no cause.

return
the exception cause.
since
Android 1.0

        return detail;
    
public java.lang.StringgetMessage()
Gets the extra information message which was provided when this exception was created. Returns {@code null} if no message was provided at creation time.

return
the exception message.
since
Android 1.0

        String msg = super.getMessage();
        if (detail != null) {
            msg = msg + "; " + detail.toString(); //$NON-NLS-1$
        }
        return msg;