rpc: internal/ethapi: added custom error types
This commit is contained in:
committed by
Péter Szilágyi
parent
ca35628cc2
commit
d77770d96e
@@ -41,6 +41,12 @@ type Error interface {
|
||||
ErrorCode() int // returns the code
|
||||
}
|
||||
|
||||
// A DataError contains some data in addition to the error message.
|
||||
type DataError interface {
|
||||
Error() string // returns the message
|
||||
ErrorData() interface{} // returns the error data
|
||||
}
|
||||
|
||||
// ServerCodec implements reading, parsing and writing RPC messages for the server side of
|
||||
// a RPC session. Implementations must be go-routine safe since the codec can be called in
|
||||
// multiple go-routines concurrently.
|
||||
|
||||
Reference in New Issue
Block a user