Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Schema = (Endpoint "throwError" () .\/ Endpoint "catchError" ()) .\/ Endpoint "catchContractError" ()
- data MyError
- = Error1 Text
- | Error2
- | MyContractError ContractError
- class AsMyError r where
- _MyError :: Prism' r MyError
- _Error1 :: Prism' r Text
- _Error2 :: Prism' r ()
- _MyContractError :: Prism' r ContractError
- contract :: (AsMyError e, AsContractError e) => SlotConfig -> Contract w Schema e ()
Documentation
type Schema = (Endpoint "throwError" () .\/ Endpoint "catchError" ()) .\/ Endpoint "catchContractError" () Source #
MyError
has a constructor for each type of error that our contract
can throw. The MyContractError
constructor wraps a ContractError
.
Error1 Text | |
Error2 | |
MyContractError ContractError |