java.io
Class WriteAbortedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
java.io.ObjectStreamException
java.io.WriteAbortedException
- All Implemented Interfaces:
- Serializable
public class WriteAbortedException
- extends ObjectStreamException
This exception is thrown when another ObjectStreamException occurs during
a serialization read or write. The stream is reset, and deserialized
objects are discarded.
- Since:
- 1.1
- See Also:
- Serialized Form
Method Summary |
Throwable |
getCause()
Returns the cause of this exception. |
String |
getMessage()
This method returns a message indicating what went wrong, in this
format:
super.getMessage() + (detail == null ? |
detail
public Exception detail
- The cause of this exception. This pre-dates the exception chaining
of Throwable; and although you can change this field, you are wiser
to leave it alone.
WriteAbortedException
public WriteAbortedException(String msg,
Exception detail)
- Create a new WriteAbortedException with a specified message and
cause.
- Parameters:
msg
- the messagedetail
- the cause
getMessage
public String getMessage()
- This method returns a message indicating what went wrong, in this
format:
super.getMessage() + (detail == null ? "" : "; " + detail)
.
- Overrides:
getMessage
in class Throwable
- Returns:
- the chained message
getCause
public Throwable getCause()
- Returns the cause of this exception. Note that this may not be the
original cause, thanks to the
detail
field being public
and non-final (yuck). However, to avoid violating the contract of
Throwable.getCause(), this returns null if detail == this
,
as no exception can be its own cause.
- Overrides:
getCause
in class Throwable
- Returns:
- the cause
- Since:
- 1.4