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

13 lines
304 B
Nim

import ../statemachine
import ./error
type
PurchaseFailed* = ref object of PurchaseState
method enter*(state: PurchaseFailed) =
let error = newException(PurchaseError, "Purchase failed")
state.switch(PurchaseErrored(error: error))
method description*(state: PurchaseFailed): string =
"failed"