File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,18 @@ func (err HTTPError) Error() string {
33
33
return fmt .Sprintf ("%v: %s" , err .Status , err .Body )
34
34
}
35
35
36
+ // Error wraps RPC errors, which contain an error code in addition to the message.
37
+ type Error interface {
38
+ Error () string // returns the message
39
+ ErrorCode () int // returns the code
40
+ }
41
+
42
+ // A DataError contains some data in addition to the error message.
43
+ type DataError interface {
44
+ Error () string // returns the message
45
+ ErrorData () interface {} // returns the error data
46
+ }
47
+
36
48
// Error types defined below are the built-in JSON-RPC errors.
37
49
38
50
var (
Original file line number Diff line number Diff line change @@ -35,18 +35,6 @@ type API struct {
35
35
Public bool // indication if the methods must be considered safe for public use
36
36
}
37
37
38
- // Error wraps RPC errors, which contain an error code in addition to the message.
39
- type Error interface {
40
- Error () string // returns the message
41
- ErrorCode () int // returns the code
42
- }
43
-
44
- // A DataError contains some data in addition to the error message.
45
- type DataError interface {
46
- Error () string // returns the message
47
- ErrorData () interface {} // returns the error data
48
- }
49
-
50
38
// ServerCodec implements reading, parsing and writing RPC messages for the server side of
51
39
// a RPC session. Implementations must be go-routine safe since the codec can be called in
52
40
// multiple go-routines concurrently.
You can’t perform that action at this time.
0 commit comments