Package org.apache.beam.sdk.coders
Class CannotProvideCoderException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.beam.sdk.coders.CannotProvideCoderException
-
- All Implemented Interfaces:
java.io.Serializable
public class CannotProvideCoderException extends java.lang.Exception
The exception thrown when aCoderRegistry
orCoderProvider
cannot provide aCoder
that has been requested.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CannotProvideCoderException.ReasonCode
Indicates the reason thatCoder
inference failed.
-
Constructor Summary
Constructors Constructor Description CannotProvideCoderException(java.lang.String message)
CannotProvideCoderException(java.lang.String message, java.lang.Throwable cause)
CannotProvideCoderException(java.lang.String message, java.lang.Throwable cause, CannotProvideCoderException.ReasonCode reason)
CannotProvideCoderException(java.lang.String message, CannotProvideCoderException.ReasonCode reason)
CannotProvideCoderException(java.lang.Throwable cause)
CannotProvideCoderException(java.lang.Throwable cause, CannotProvideCoderException.ReasonCode reason)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CannotProvideCoderException.ReasonCode
getReason()
java.lang.Throwable
getRootCause()
Returns the inner-mostCannotProvideCoderException
when they are deeply nested.
-
-
-
Constructor Detail
-
CannotProvideCoderException
public CannotProvideCoderException(java.lang.String message)
-
CannotProvideCoderException
public CannotProvideCoderException(java.lang.String message, CannotProvideCoderException.ReasonCode reason)
-
CannotProvideCoderException
public CannotProvideCoderException(java.lang.String message, java.lang.Throwable cause)
-
CannotProvideCoderException
public CannotProvideCoderException(java.lang.String message, java.lang.Throwable cause, CannotProvideCoderException.ReasonCode reason)
-
CannotProvideCoderException
public CannotProvideCoderException(java.lang.Throwable cause)
-
CannotProvideCoderException
public CannotProvideCoderException(java.lang.Throwable cause, CannotProvideCoderException.ReasonCode reason)
-
-
Method Detail
-
getReason
public CannotProvideCoderException.ReasonCode getReason()
- Returns:
- the reason that Coder inference failed.
-
getRootCause
public java.lang.Throwable getRootCause()
Returns the inner-mostCannotProvideCoderException
when they are deeply nested.For example, if a coder for
List<KV<Integer, Whatsit>>
cannot be provided because there is no known coder forWhatsit
, the root cause of the exception should be a CannotProvideCoderException with details pertinent toWhatsit
, suppressing the intermediate layers.
-
-