Class ApplicationFailureException
Exception representing an error in user code.
Inherited Members
Namespace: Temporalio.Exceptions
Assembly: Temporalio.dll
Syntax
public class ApplicationFailureException : FailureException
Remarks
For workflows, users should throw this exception to signal a workflow failure. Other non-Temporal exceptions will not fail the workflow.
In activities, all non-Temporal exceptions are translated to this exception as retryable with the Type as the unqualified exception class name.
Constructors
ApplicationFailureException(String, Nullable<Exception>, Nullable<String>, Boolean, Nullable<IReadOnlyCollection<Object>>)
Initializes a new instance of the ApplicationFailureException class.
Declaration
public ApplicationFailureException(string message, Exception? inner, string? type = null, bool nonRetryable = false, IReadOnlyCollection<object>? details = null)
Parameters
Type | Name | Description |
---|---|---|
String | message | Required message for the exception. |
Nullable<Exception> | inner | Cause of the exception (can use other constructor if no cause). |
Nullable<String> | type | Optional string type name of the exception. |
Boolean | nonRetryable | If true, marks the exception as non-retryable. |
Nullable<IReadOnlyCollection<Object>> | details | Collection of details to serialize into the exception. |
ApplicationFailureException(String, Nullable<String>, Boolean, Nullable<IReadOnlyCollection<Object>>)
Initializes a new instance of the ApplicationFailureException class.
Declaration
public ApplicationFailureException(string message, string? type = null, bool nonRetryable = false, IReadOnlyCollection<object>? details = null)
Parameters
Type | Name | Description |
---|---|---|
String | message | Required message for the exception. |
Nullable<String> | type | Optional string type name of the exception. |
Boolean | nonRetryable | If true, marks the exception as non-retryable. |
Nullable<IReadOnlyCollection<Object>> | details | Collection of details to serialize into the exception. |
ApplicationFailureException(Failure, Nullable<Exception>, IPayloadConverter)
Initializes a new instance of the ApplicationFailureException class.
Declaration
protected ApplicationFailureException(Failure failure, Exception? inner, IPayloadConverter converter)
Parameters
Type | Name | Description |
---|---|---|
Failure | failure | Underlying proto failure. |
Nullable<Exception> | inner | Inner exception if any. |
IPayloadConverter | converter | Converter used for converting details. |
Properties
Type
Gets the string "type" of the exception if any.
Declaration
public string? Type { get; }
Property Value
Type | Description |
---|---|
Nullable<String> |