public class HandlerException
extends java.lang.RuntimeException
| Modifier and Type | Class and Description |
|---|---|
static class |
HandlerException.ErrorType
Error type that can occur on a handler exception.
|
static class |
HandlerException.RetryBehavior
RetryBehavior allows handlers to explicitly set the retry behavior of a
HandlerException. |
| Constructor and Description |
|---|
HandlerException(HandlerException.ErrorType errorType,
java.lang.String causeMessage)
Deprecated.
Use
HandlerException(ErrorType, String, Throwable) instead. This
constructor will be removed in a future release. |
HandlerException(HandlerException.ErrorType errorType,
java.lang.String causeMessage,
HandlerException.RetryBehavior retryBehavior)
Deprecated.
Use
HandlerException(ErrorType, String, Throwable, RetryBehavior) instead.
This constructor will be removed in a future release. |
HandlerException(HandlerException.ErrorType errorType,
java.lang.String message,
@Nullable java.lang.Throwable cause)
Create a handler exception with the given error type, message, and cause.
|
HandlerException(HandlerException.ErrorType errorType,
java.lang.String message,
@Nullable java.lang.Throwable cause,
HandlerException.RetryBehavior retryBehavior)
Create a handler exception with the given error type, message, cause, and retry behavior.
|
HandlerException(HandlerException.ErrorType errorType,
java.lang.String message,
@Nullable java.lang.Throwable cause,
HandlerException.RetryBehavior retryBehavior,
FailureInfo originalFailure)
Create a handler exception with the given error type, message, cause, retry behavior, and
original failure.
|
HandlerException(HandlerException.ErrorType errorType,
@Nullable java.lang.Throwable cause)
Create a handler exception with the given error type and cause.
|
HandlerException(HandlerException.ErrorType errorType,
@Nullable java.lang.Throwable cause,
HandlerException.RetryBehavior retryBehavior)
Create a handler exception with the given error type, cause, and retry behavior.
|
HandlerException(java.lang.String rawErrorType,
java.lang.String message,
@Nullable java.lang.Throwable cause,
HandlerException.RetryBehavior retryBehavior)
Create a handler exception with a raw error type string, message, cause, and retry behavior.
|
HandlerException(java.lang.String rawErrorType,
java.lang.String message,
@Nullable java.lang.Throwable cause,
HandlerException.RetryBehavior retryBehavior,
@Nullable FailureInfo originalFailure)
Create a handler exception with a raw error type string, message, cause, retry behavior, and
original failure.
|
HandlerException(java.lang.String rawErrorType,
@Nullable java.lang.Throwable cause,
HandlerException.RetryBehavior retryBehavior)
Create a handler exception with a raw error type string, cause, and retry behavior.
|
| Modifier and Type | Method and Description |
|---|---|
HandlerException.ErrorType |
getErrorType()
Error type for this exception.
|
@Nullable FailureInfo |
getOriginalFailure()
Original FailureInfo if available
|
java.lang.String |
getRawErrorType()
Get the raw error type.
|
HandlerException.RetryBehavior |
getRetryBehavior()
Retry behavior for this exception.
|
boolean |
isRetryable() |
public HandlerException(HandlerException.ErrorType errorType, java.lang.String causeMessage)
HandlerException(ErrorType, String, Throwable) instead. This
constructor will be removed in a future release.errorType - The error type.causeMessage - The cause message.public HandlerException(HandlerException.ErrorType errorType, java.lang.String causeMessage, HandlerException.RetryBehavior retryBehavior)
HandlerException(ErrorType, String, Throwable, RetryBehavior) instead.
This constructor will be removed in a future release.errorType - The error type.causeMessage - The cause message.retryBehavior - The retry behavior for this exception.public HandlerException(HandlerException.ErrorType errorType, java.lang.String message, @Nullable java.lang.Throwable cause)
errorType - The error type.message - The error message.cause - The cause of this exception.public HandlerException(HandlerException.ErrorType errorType, @Nullable java.lang.Throwable cause)
errorType - The error type.cause - The cause of this exception.public HandlerException(HandlerException.ErrorType errorType, @Nullable java.lang.Throwable cause, HandlerException.RetryBehavior retryBehavior)
errorType - The error type.cause - The cause of this exception.retryBehavior - The retry behavior for this exception.public HandlerException(HandlerException.ErrorType errorType, java.lang.String message, @Nullable java.lang.Throwable cause, HandlerException.RetryBehavior retryBehavior)
errorType - The error type.message - The error message.cause - The cause of this exception.retryBehavior - The retry behavior for this exception.public HandlerException(HandlerException.ErrorType errorType, java.lang.String message, @Nullable java.lang.Throwable cause, HandlerException.RetryBehavior retryBehavior, FailureInfo originalFailure)
errorType - The error type.message - The error message.cause - The cause of this exception.retryBehavior - The retry behavior for this exception.originalFailure - The original failure information if available.public HandlerException(java.lang.String rawErrorType,
@Nullable java.lang.Throwable cause,
HandlerException.RetryBehavior retryBehavior)
rawErrorType - The raw error type string.cause - The cause of this exception.retryBehavior - The retry behavior for this exception.public HandlerException(java.lang.String rawErrorType,
java.lang.String message,
@Nullable java.lang.Throwable cause,
HandlerException.RetryBehavior retryBehavior)
rawErrorType - The raw error type string.message - The error message.cause - The cause of this exception.retryBehavior - The retry behavior for this exception.public HandlerException(java.lang.String rawErrorType,
java.lang.String message,
@Nullable java.lang.Throwable cause,
HandlerException.RetryBehavior retryBehavior,
@Nullable FailureInfo originalFailure)
rawErrorType - The raw error type string.message - The error message.cause - The cause of this exception.retryBehavior - The retry behavior for this exception.originalFailure - The original failure information if available.public java.lang.String getRawErrorType()
HandlerException.ErrorType.UNKNOWN, it will return the
string representation of the error type.public HandlerException.ErrorType getErrorType()
HandlerException.ErrorType.UNKNOWN.public HandlerException.RetryBehavior getRetryBehavior()
public @Nullable FailureInfo getOriginalFailure()
public boolean isRetryable()