Skip to content

Commit

Permalink
fix: weird go panic
Browse files Browse the repository at this point in the history
  • Loading branch information
powerman committed Apr 22, 2020
1 parent e9498a9 commit c2902e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jsonrpc2/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ func WrapError(err error) error {
if err == nil || err == rpc.ErrShutdown || err == io.ErrUnexpectedEOF {
return err
}
return wrapError{err: ServerError(err)}
return &wrapError{err: ServerError(err)}
}

func (e wrapError) Error() string {
func (e *wrapError) Error() string {
return fmt.Sprintf("%d %s", e.err.Code, e.err.Message)
}

func (e wrapError) Unwrap() error {
func (e *wrapError) Unwrap() error {
return e.err
}

0 comments on commit c2902e8

Please sign in to comment.