mirror of
https://github.com/status-im/nim-codex.git
synced 2025-01-09 18:36:29 +00:00
3181361658
* [state machine] Allow querying of state properties * [purchasing] use new state machine * [state machine] remove old state machine implementation * [purchasing] remove duplication in error handling
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))
|