public class CannotProvideCoderException
extends java.lang.Exception
CoderRegistry
or CoderProvider
cannot provide a
Coder
that has been requested.Modifier and Type | Class and Description |
---|---|
static class |
CannotProvideCoderException.ReasonCode
Indicates the reason that
Coder inference failed. |
Constructor and Description |
---|
CannotProvideCoderException(java.lang.String message) |
CannotProvideCoderException(java.lang.String message,
CannotProvideCoderException.ReasonCode reason) |
CannotProvideCoderException(java.lang.String message,
java.lang.Throwable cause) |
CannotProvideCoderException(java.lang.String message,
java.lang.Throwable cause,
CannotProvideCoderException.ReasonCode reason) |
CannotProvideCoderException(java.lang.Throwable cause) |
CannotProvideCoderException(java.lang.Throwable cause,
CannotProvideCoderException.ReasonCode reason) |
Modifier and Type | Method and Description |
---|---|
CannotProvideCoderException.ReasonCode |
getReason() |
java.lang.Throwable |
getRootCause()
Returns the inner-most
CannotProvideCoderException when they are deeply nested. |
public CannotProvideCoderException(java.lang.String message)
public CannotProvideCoderException(java.lang.String message, CannotProvideCoderException.ReasonCode reason)
public CannotProvideCoderException(java.lang.String message, java.lang.Throwable cause)
public CannotProvideCoderException(java.lang.String message, java.lang.Throwable cause, CannotProvideCoderException.ReasonCode reason)
public CannotProvideCoderException(java.lang.Throwable cause)
public CannotProvideCoderException(java.lang.Throwable cause, CannotProvideCoderException.ReasonCode reason)
public CannotProvideCoderException.ReasonCode getReason()
public java.lang.Throwable getRootCause()
CannotProvideCoderException
when they are deeply nested.
For example, if a coder for List<KV<Integer, Whatsit>>
cannot be provided because
there is no known coder for Whatsit
, the root cause of the exception should be a
CannotProvideCoderException with details pertinent to Whatsit
, suppressing the
intermediate layers.