nim-dagger/codex/purchasing/states/errorhandling.nim

10 lines
245 B
Nim
Raw Normal View History

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