logos-storage-nim/codex/sales/states/errorhandling.nim
2023-07-17 13:39:25 +02:00

11 lines
262 B
Nim

import pkg/questionable
import ../statemachine
import ./errored
import ../../asyncyeah
type
ErrorHandlingState* = ref object of SaleState
method onError*(state: ErrorHandlingState, error: ref CatchableError): ?State =
some State(SaleErrored(error: error))