An exception view contains the full information of an exception stack trace and causes, but does not hold any instances of the exceptions. This is generally useful when clients only want to access the stack trace and causes of an exception, but not the actual exception instances.
Sometimes it is not possible to transfer the exceptions over RMI, as the exceptions classes might not be found on the other endpoint. In order to avoid the errors this could cause, and exception view can be transferred, which only holds raw data.
Use create(
protected static final ExceptionView[] | Singleton empty ExceptionView array. |
protected ExceptionView | The cause of the exception. |
protected String | The class name of the exception. |
protected String | The message of the exception. |
protected StackTraceElement[] | The stack trace of the exception. |
protected String | The result of Throwable.toString(). |
protected ExceptionView[] | The suppressed exceptions. |
public | For Externalizable. |
public | Creates a new exception view intialized with the argument throwable. |
public | ExceptionView( Creates a new exception view by copying the data from the argument. |
public static ExceptionView | Creates a new exception view based on the argument exception. |
protected static < | createImpl( Creates a new exception view based on the argument exception, using the specified view creator. |
public ExceptionView | getCause() Gets the cause of the exception. |
public String | Gets the class name of the exception. |
public String | Gets the message of the exception. |
public StackTraceElement[] | Gets the stack trace of the exception. |
public ExceptionView[] | Gets the suppressed exceptions of this exception. |
public void | |
public void | Prints the stack trace to the specified stream. |
public void | Prints the stack trace to the specified stream. |
public void | Prints the stack trace to the specified string builder. |
public void | The object implements the readExternal method to restore its
contents by calling the methods of DataInput for primitive
types and readObject for objects, strings and arrays. |
public String | toString() Returns a string representation of the object. |
public void | The object implements the writeExternal method to save its contents
by calling the methods of DataOutput for its primitive values or
calling the writeObject method of ObjectOutput for objects, strings,
and arrays. |
The cause and suppressed exceptions are not initialized.
null
.The cause and suppressed exceptions are not copied recursively.
null
.null
.The format is the same as Throwable.printStackTrace().
The format is the same as Throwable.printStackTrace(
The format is the same as Throwable.printStackTrace(
The format is the same as Throwable.printStackTrace(
toString
method returns a string that
"textually represents" this object. The result should be a concise but informative representation that is easy
for a person to read. It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of
which the object is an instance, the at-sign character `@
', and the unsigned hexadecimal representation
of the hash code of the object. In other words, this method returns a string equal to the value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())