plutus-playground-server-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

ErrorHandling

Synopsis

Documentation

type Schema = (Endpoint "throwError" Text .\/ Endpoint "catchError" Text) .\/ Endpoint "catchContractError" () Source #

throw :: AsMyError e => Text -> Contract () s e () Source #

Throw an Error1, using throwing and the prism generated by makeClassyPrisms

throwAndCatch :: AsMyError e => Text -> Contract () s e () Source #

Handle the error from throw using catching

catchContractError :: AsMyError e => SlotConfig -> Contract () s e () Source #

Handle an error from 'awaitTime by wrapping it in the AContractError constructor