nim-codex/codex/sales/states/unknown.nim
Eric Mastro b220f4198a
[statemachine] allow multiple source states in Transition
- multiple source states allowed in transition removed need for boilerplate subscription handling

TODO:
1. fix compilation for multiple transition source states
2. add tests for:
  - no transitioning to self
  - multiple source states in transition
3. Check how CancelledError gets caught in future callback
4. Remove Future[?State] from run return type?
2023-02-21 17:21:23 +11:00

15 lines
313 B
Nim

import ../statemachine
import ./filled
import ./finished
import ./failed
import ./errored
import ./cancelled
type
SaleUnknown* = ref object of SaleState
SaleUnknownError* = object of CatchableError
UnexpectedSlotError* = object of SaleUnknownError
method `$`*(state: SaleUnknown): string = "SaleUnknown"