Interface IFailureConverter
Representation of a failure converter to convert exceptions to/from Temporal failures.
Namespace: Temporalio.Converters
Assembly: Temporalio.dll
Syntax
public interface IFailureConverter
Remarks
This converter should be deterministic since it is used for workflows. For the same reason, this converter should be immediate and avoid any network calls or any asynchronous/slow code paths.
Methods
ToException(Failure, IPayloadConverter)
Convert the given failure to an exception.
Declaration
Exception ToException(Failure failure, IPayloadConverter payloadConverter)
Parameters
Type | Name | Description |
---|---|---|
Failure | failure | Failure to convert. |
IPayloadConverter | payloadConverter | Payload converter to use if needed. |
Returns
Type | Description |
---|---|
Exception | Created exception. |
ToFailure(Exception, IPayloadConverter)
Convert the given exception to a failure.
Declaration
Failure ToFailure(Exception exception, IPayloadConverter payloadConverter)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Exception to convert. |
IPayloadConverter | payloadConverter | Payload converter to use if needed. |
Returns
Type | Description |
---|---|
Failure | Created failure. |