internal/ethapi: add errorCode to revert error
This commit is contained in:
committed by
Péter Szilágyi
parent
cc37ce796b
commit
d9b4bc76d4
@ -868,6 +868,7 @@ var _ rpc.DataError = (*revertError)(nil)
|
||||
|
||||
type revertError struct {
|
||||
err string // The error string
|
||||
code int // optional error code
|
||||
errData interface{} // additional data
|
||||
}
|
||||
|
||||
@ -875,6 +876,10 @@ func (e revertError) Error() string {
|
||||
return e.err
|
||||
}
|
||||
|
||||
func (e revertError) ErrorCode() int {
|
||||
return e.code
|
||||
}
|
||||
|
||||
func (e revertError) ErrorData() interface{} {
|
||||
return e.errData
|
||||
}
|
||||
|
Reference in New Issue
Block a user