mirror of
https://github.com/status-im/nim-codex.git
synced 2025-01-11 11:24:33 +00:00
10 lines
245 B
Nim
10 lines
245 B
Nim
|
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))
|