| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Morley.Client.RPC.Error
Description
Various errors that can happen in the RPC part of morley-client.
Synopsis
- data ClientRpcError
- = ContractFailed Address Expression
- | BadParameter Address Expression
- | EmptyTransaction Address
- | ShiftOverflow Address
- | GasExhaustion Address
- | KeyAlreadyRevealed Address
- | ClientInternalError InternalError
- data RunCodeErrors = RunCodeErrors [RunError]
- data UnexpectedErrors
- data IncorrectRpcResponse
Documentation
data ClientRpcError Source #
Errors that can happen in the RPC part when a user tries to make failing actions.
Constructors
| ContractFailed | Smart contract execution has failed. |
Fields
| |
| BadParameter | Parameter passed to a contract does not match its type. |
Fields
| |
| EmptyTransaction | Transfer of 0 to an implicit account. |
Fields
| |
| ShiftOverflow | A smart contract execution failed due to a shift overflow. |
Fields
| |
| GasExhaustion | A smart contract execution failed due gas exhaustion. |
Fields
| |
| KeyAlreadyRevealed | A key has already been revealed. |
Fields
| |
| ClientInternalError InternalError | An error that RPC considers internal occurred. These errors
are considered internal by mistake, they are actually quite
realistic and normally indicate bad user action. Currently we
put |
Instances
| Show ClientRpcError Source # | |
Defined in Morley.Client.RPC.Error Methods showsPrec :: Int -> ClientRpcError -> ShowS # show :: ClientRpcError -> String # showList :: [ClientRpcError] -> ShowS # | |
| Exception ClientRpcError Source # | |
Defined in Morley.Client.RPC.Error Methods toException :: ClientRpcError -> SomeException # | |
| Buildable ClientRpcError Source # | |
Defined in Morley.Client.RPC.Error Methods build :: ClientRpcError -> Builder # | |
data RunCodeErrors Source #
Errors that can happen during run_code endpoint call.
These errors returned along with 500 code, so we have to handle
them a bit differently in comparison to other run errors that are
returned as a part of successful JSON response.
Constructors
| RunCodeErrors [RunError] |
Instances
| Show RunCodeErrors Source # | |
Defined in Morley.Client.RPC.Error Methods showsPrec :: Int -> RunCodeErrors -> ShowS # show :: RunCodeErrors -> String # showList :: [RunCodeErrors] -> ShowS # | |
| Exception RunCodeErrors Source # | |
Defined in Morley.Client.RPC.Error Methods toException :: RunCodeErrors -> SomeException # fromException :: SomeException -> Maybe RunCodeErrors # displayException :: RunCodeErrors -> String # | |
| Buildable RunCodeErrors Source # | |
Defined in Morley.Client.RPC.Error Methods build :: RunCodeErrors -> Builder # | |
data UnexpectedErrors Source #
Errors that we don't expect to happen, but they can be reported by the server.
Constructors
| UnexpectedRunErrors [RunError] | |
| UnexpectedInternalErrors [InternalError] |
Instances
| Show UnexpectedErrors Source # | |
Defined in Morley.Client.RPC.Error Methods showsPrec :: Int -> UnexpectedErrors -> ShowS # show :: UnexpectedErrors -> String # showList :: [UnexpectedErrors] -> ShowS # | |
| Exception UnexpectedErrors Source # | |
Defined in Morley.Client.RPC.Error Methods toException :: UnexpectedErrors -> SomeException # | |
| Buildable UnexpectedErrors Source # | |
Defined in Morley.Client.RPC.Error Methods build :: UnexpectedErrors -> Builder # | |
data IncorrectRpcResponse Source #
Errors that we can throw when we get a response from a node that doesn't match our expectations. It means that either the node we are talking to misbehaves or our code is incorrect.
Constructors
| RpcUnexpectedSize Int Int | |
| RpcOriginatedNoContracts | |
| RpcNoOperationsRun | |
| RpcOriginatedMoreContracts [Address] |
Instances
| Show IncorrectRpcResponse Source # | |
Defined in Morley.Client.RPC.Error Methods showsPrec :: Int -> IncorrectRpcResponse -> ShowS # show :: IncorrectRpcResponse -> String # showList :: [IncorrectRpcResponse] -> ShowS # | |
| Exception IncorrectRpcResponse Source # | |
Defined in Morley.Client.RPC.Error Methods toException :: IncorrectRpcResponse -> SomeException # fromException :: SomeException -> Maybe IncorrectRpcResponse # | |
| Buildable IncorrectRpcResponse Source # | |
Defined in Morley.Client.RPC.Error Methods build :: IncorrectRpcResponse -> Builder # | |