public class TaskExecutionException
extends java.lang.RuntimeException
When an error happens in an operator, it should be wrapped with TaskExecutionException if the cause is expected so that Digdag shows a message for users without verbose stacktrace. The other exception classes are regarded as unexpected and Digdag shows stacktrace for operator developers.
TaskExecutionException is also used to let Digdag retry the task later. Use ofNextPolling (if task retries for simple polling) or ofNextPollingWithCause (if task retries to recover from an error) method to retry.
| Constructor and Description |
|---|
TaskExecutionException(java.lang.String message)
Build an expected exception with a simple message to make the task failed.
|
TaskExecutionException(java.lang.String message,
io.digdag.client.config.ConfigElement error)
Deprecated.
|
TaskExecutionException(java.lang.String message,
java.util.Map<java.lang.String,java.lang.String> errorProperties)
Build an expected exception with a simple message and properties to make the task failed.
|
TaskExecutionException(java.lang.String customMessage,
java.lang.Throwable cause)
Wrap an expected exception with a custom well-formatted message to make the task failed.
|
TaskExecutionException(java.lang.Throwable cause)
Wrap an expected exception to make the task failed.
|
TaskExecutionException(java.lang.Throwable cause,
io.digdag.client.config.ConfigElement error)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static io.digdag.client.config.ConfigElement |
buildExceptionErrorConfig(java.lang.String message,
java.lang.Throwable ex) |
static io.digdag.client.config.ConfigElement |
buildExceptionErrorConfig(java.lang.Throwable ex) |
com.google.common.base.Optional<io.digdag.client.config.Config> |
getError(io.digdag.client.config.ConfigFactory cf) |
com.google.common.base.Optional<java.lang.Integer> |
getRetryInterval() |
com.google.common.base.Optional<io.digdag.client.config.Config> |
getStateParams(io.digdag.client.config.ConfigFactory cf) |
boolean |
isError() |
static TaskExecutionException |
ofNextPolling(int interval,
io.digdag.client.config.ConfigElement nextStateParams) |
static TaskExecutionException |
ofNextPollingWithCause(java.lang.Throwable cause,
int interval,
io.digdag.client.config.ConfigElement nextStateParams) |
public TaskExecutionException(java.lang.Throwable cause)
public TaskExecutionException(java.lang.String customMessage,
java.lang.Throwable cause)
public TaskExecutionException(java.lang.String message)
public TaskExecutionException(java.lang.String message,
java.util.Map<java.lang.String,java.lang.String> errorProperties)
@Deprecated
public TaskExecutionException(java.lang.String message,
io.digdag.client.config.ConfigElement error)
@Deprecated
public TaskExecutionException(java.lang.Throwable cause,
io.digdag.client.config.ConfigElement error)
public static io.digdag.client.config.ConfigElement buildExceptionErrorConfig(java.lang.Throwable ex)
public static io.digdag.client.config.ConfigElement buildExceptionErrorConfig(java.lang.String message,
java.lang.Throwable ex)
public static TaskExecutionException ofNextPolling(int interval, io.digdag.client.config.ConfigElement nextStateParams)
public static TaskExecutionException ofNextPollingWithCause(java.lang.Throwable cause, int interval, io.digdag.client.config.ConfigElement nextStateParams)
public com.google.common.base.Optional<io.digdag.client.config.Config> getError(io.digdag.client.config.ConfigFactory cf)
public boolean isError()
public com.google.common.base.Optional<java.lang.Integer> getRetryInterval()
public com.google.common.base.Optional<io.digdag.client.config.Config> getStateParams(io.digdag.client.config.ConfigFactory cf)