public final class EncodableThrowable
extends java.lang.Object
implements java.io.Serializable
Throwable for use with coders.
Though Throwable is serializable, it doesn't override Object.equals(Object),
which can lead to false positives in mutation detection for coders. This class provides a coder-
safe way to pass exceptions around without running into problems like log spam.
This class is not suitable for general-purpose equality comparison among Throwables
and should only be used to pass a Throwable from one PTransform to another.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static EncodableThrowable |
forThrowable(java.lang.Throwable throwable)
Wraps
throwable and returns the result. |
int |
hashCode() |
java.lang.Throwable |
throwable()
Returns the underlying
Throwable. |
public static EncodableThrowable forThrowable(java.lang.Throwable throwable)
throwable and returns the result.public java.lang.Throwable throwable()
Throwable.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(@Nullable java.lang.Object obj)
equals in class java.lang.Object