Class ApplicationFailure.Builder
java.lang.Object
io.temporal.failure.ApplicationFailure.Builder
- Enclosing class:
ApplicationFailure
-
Method Summary
Modifier and TypeMethodDescriptionbuild()setCategory(ApplicationErrorCategory category) Set the optional category of the failure.Set the optional cause of the failure.setDetails(Values details) Set the optional details of the failure.setDetails(Object... details) Set the optional details of the failure.setMessage(String message) Set the optional error message.setNextRetryDelay(Duration nextRetryDelay) Set the optional delay before the next retry attempt.setNonRetryable(boolean nonRetryable) Set the non retryable flag on the failure.Sets the error type of this failure.
-
Method Details
-
setType
Sets the error type of this failure. This is used byRetryOptions.Builder.setDoNotRetry(String...)to determine if the exception is non retryable. -
setMessage
Set the optional error message.Default is "".
-
setDetails
Set the optional details of the failure.Details are serialized using the same approach as arguments and results.
-
setDetails
Set the optional details of the failure.Details are serialized using the same approach as arguments and results.
-
setNonRetryable
Set the non retryable flag on the failure.It means that this exception is not going to be retried even if it is not included into retry policy doNotRetry list.
Default is false.
-
setCause
Set the optional cause of the failure. Each element of the cause chain will be converted toApplicationFailurefor network transmission across network if it doesn't extendTemporalFailure. -
setNextRetryDelay
Set the optional delay before the next retry attempt. Overrides the normal retry delay.Default is null.
-
setCategory
Set the optional category of the failure.Default is
ApplicationErrorCategory.UNSPECIFIED. -
build
-