Table of Contents

Interface IFailureConverter

Namespace
Temporalio.Converters
Assembly
Temporalio.dll

Representation of a failure converter to convert exceptions to/from Temporal failures.

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.

Exception ToException(Failure failure, IPayloadConverter payloadConverter)

Parameters

failure Failure

Failure to convert.

payloadConverter IPayloadConverter

Payload converter to use if needed.

Returns

Exception

Created exception.

ToFailure(Exception, IPayloadConverter)

Convert the given exception to a failure.

Failure ToFailure(Exception exception, IPayloadConverter payloadConverter)

Parameters

exception Exception

Exception to convert.

payloadConverter IPayloadConverter

Payload converter to use if needed.

Returns

Failure

Created failure.

See Also