mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
feat: return revert data
This commit is contained in:
parent
a5fe7353cf
commit
d61dc43696
1 changed files with 2 additions and 1 deletions
|
|
@ -365,7 +365,8 @@ func (c *Client) CallContext(ctx context.Context, result interface{}, method str
|
||||||
resp := batchresp[0]
|
resp := batchresp[0]
|
||||||
switch {
|
switch {
|
||||||
case resp.Error != nil:
|
case resp.Error != nil:
|
||||||
return resp.Error
|
errMsg := fmt.Sprintf("%s: %s", resp.Error.Message, resp.Error.Data)
|
||||||
|
return errors.New(errMsg)
|
||||||
case len(resp.Result) == 0:
|
case len(resp.Result) == 0:
|
||||||
return ErrNoResult
|
return ErrNoResult
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue