sage v0.2.0 Sage.CompensationErrorHandler behaviour
This module provides behaviour for compensation error handling.
For more information see “Critical Error Handling” in Sage module doc.
Link to this section Summary
Callbacks
Handler for critical errors for compensation execution
Link to this section Types
Link to this type
compensations_to_run()
compensations_to_run() :: {name :: Sage.name(), compensation :: Sage.compensation(), effect_to_compensate :: any()}
Link to this type
error()
error() :: {:exception, exception :: Exception.t(), stacktrace :: Exception.stacktrace()} | {:exit, reason :: any()} | {:throw, error :: any()}
Link to this section Callbacks
Link to this callback
handle_error(error, compensations_to_run, opts)
handle_error(error :: error(), compensations_to_run :: compensations_to_run(), opts :: any()) :: {:error, reason :: any()}
Handler for critical errors for compensation execution.
It should return only {:error, reason}
which would be returned by the Sage itself.