Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.coders
Class CannotProvideCoderException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.google.cloud.dataflow.sdk.coders.CannotProvideCoderException
-
- All Implemented Interfaces:
- Serializable
public class CannotProvideCoderException extends Exception
The exception thrown when aCoderProvider
cannot provide aCoder
that has been requested.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
CannotProvideCoderException.ReasonCode
Indicates the reason thatCoder
inference failed.
-
Constructor Summary
Constructors Constructor and Description CannotProvideCoderException(String message)
CannotProvideCoderException(String message, CannotProvideCoderException.ReasonCode reason)
CannotProvideCoderException(String message, Throwable cause)
CannotProvideCoderException(String message, Throwable cause, CannotProvideCoderException.ReasonCode reason)
CannotProvideCoderException(Throwable cause)
CannotProvideCoderException(Throwable cause, CannotProvideCoderException.ReasonCode reason)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description CannotProvideCoderException.ReasonCode
getReason()
Throwable
getRootCause()
Returns the inner-mostCannotProvideCoderException
when they are deeply nested.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
CannotProvideCoderException
public CannotProvideCoderException(String message)
-
CannotProvideCoderException
public CannotProvideCoderException(String message, CannotProvideCoderException.ReasonCode reason)
-
CannotProvideCoderException
public CannotProvideCoderException(String message, Throwable cause, CannotProvideCoderException.ReasonCode reason)
-
CannotProvideCoderException
public CannotProvideCoderException(Throwable cause)
-
CannotProvideCoderException
public CannotProvideCoderException(Throwable cause, CannotProvideCoderException.ReasonCode reason)
-
-
Method Detail
-
getReason
public CannotProvideCoderException.ReasonCode getReason()
- Returns:
- the reason that Coder inference failed.
-
getRootCause
public 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.
-
-