network.protocols.jsonrpc.exception - Palamecia/mint GitHub Wiki
Module
load network.protocols.jsonrpc.exception
This module provides classes to store exception contexts raised by the Network.JsonRpc module.
Packages
Classes
Network.JsonRpc.Exception
This class provides the context of an exception raised by the Network.JsonRpc protocol.
Inherits
Members
Modifiers | Member | Description |
---|---|---|
+ const |
!= | Returns false if self is the same error as other ; otherwise returns t ... |
+ const |
== | Returns true if self is the same error as other ; otherwise returns fa ... |
- final |
code | Internal error code. |
- final |
data | Internal error data. |
+ @ const |
fromHash | Creates a new instance of Network.JsonRpc.Exception from a hash. |
+ const |
getCode | Returns the error code of the exception. |
+ const |
getData | Returns the error data of the exception. |
+ const |
getMessage | Returns the error message of the exception. |
+ @ const |
isServerErrorCode | Rettruns true if code is a JSON RPC server error code; otherwise returns ... |
- final |
message | Internal error message. |
+ const |
new | Creates a new context. The code parameter provides the error code of the ex... |
+ const |
toHash | Returns the error as a hash that can be used to create an instance of Network... |
+ const |
toString | Returns the exception informations as a string. |
Constants
Functions
- Network.JsonRpc.InternalError
- Network.JsonRpc.InvalidParams
- Network.JsonRpc.InvalidRequest
- Network.JsonRpc.MethodNotFound
- Network.JsonRpc.ParseError
- Network.JsonRpc.RequestCancelled
- Network.JsonRpc.ServerError
Descriptions
Network.JsonRpc.ErrorCode
{- 32700 : 'Parse Error', - 32600 : 'Invalid Request', - 32601 : 'Method Not Found', - 32602 : 'Invalid Params', - 32602 : 'Internal Error', - 32800 : 'Request Cancelled'}
This hash provides the mapping between a JSON PRC error code and its message.
Network.JsonRpc.Exception.!=
def (const self, const other)
Returns false
if self
is the same error as other
; otherwise
returns true
.
Network.JsonRpc.Exception.==
def (const self, const other)
Returns true
if self
is the same error as other
; otherwise
returns false
.
Network.JsonRpc.Exception.code
none
Internal error code.
Network.JsonRpc.Exception.data
none
Internal error data.
Network.JsonRpc.Exception.fromHash
def (error)
Creates a new instance of Network.JsonRpc.Exception from a hash.
Network.JsonRpc.Exception.getCode
def (const self)
Returns the error code of the exception.
Network.JsonRpc.Exception.getData
def (const self)
Returns the error data of the exception.
Network.JsonRpc.Exception.getMessage
def (const self)
Returns the error message of the exception.
Network.JsonRpc.Exception.isServerErrorCode
def (code)
Rettruns true
if code
is a JSON RPC server error code; otherwise
returns false
.
Network.JsonRpc.Exception.message
none
Internal error message.
Network.JsonRpc.Exception.new
def (self, code, message = none, data = none)
Creates a new context. The code
parameter provides the error
code of the exception as a number. If the message
parameter is
given, the value of the parameter will be used as the error message;
otherwise the message will be guessed from the error code. The data
parameter can provide extra data for the error message.
Network.JsonRpc.Exception.toHash
def (const self)
Returns the error as a hash that can be used to create an instance of Network.JsonRpc.Message.
Network.JsonRpc.Exception.toString
def (const self)
Returns the exception informations as a string.
Network.JsonRpc.InternalError
def (data = none)
Creates a new instance of Network.JsonRpc.Exception for an internal error.
Network.JsonRpc.InvalidParams
def (data = none)
Creates a new instance of Network.JsonRpc.Exception for an invalid parameter.
Network.JsonRpc.InvalidRequest
def (data = none)
Creates a new instance of Network.JsonRpc.Exception for an invalid request.
Network.JsonRpc.MethodNotFound
def (data = none)
Creates a new instance of Network.JsonRpc.Exception for a method not found.
Network.JsonRpc.ParseError
def (data = none)
Creates a new instance of Network.JsonRpc.Exception for a pasre error.
Network.JsonRpc.RequestCancelled
def (data = none)
Creates a new instance of Network.JsonRpc.Exception for a cancelled request.
Network.JsonRpc.ServerError
def (code, message = none, data = none)
Creates a new instance of Network.JsonRpc.Exception for a server error.