mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
ethclient: check error
This commit is contained in:
parent
c0be9ce9aa
commit
2b50c7bcfd
1 changed files with 3 additions and 0 deletions
|
|
@ -801,6 +801,9 @@ func ExampleRevertErrorData() {
|
||||||
|
|
||||||
// Parse the revert data to obtain the error message.
|
// Parse the revert data to obtain the error message.
|
||||||
message, err := abi.UnpackRevert(revertData)
|
message, err := abi.UnpackRevert(revertData)
|
||||||
|
if err != nil {
|
||||||
|
panic("parsing ABI error failed: " + err.Error())
|
||||||
|
}
|
||||||
fmt.Println("message:", message)
|
fmt.Println("message:", message)
|
||||||
|
|
||||||
// Output:
|
// Output:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue