mirror of https://github.com/poanetwork/gecko.git
make error message more clear when an argument can't be unmarshaled
This commit is contained in:
parent
c8a025e1d6
commit
940f9a2fb8
|
@ -50,3 +50,10 @@ func (r *request) Method() (string, error) {
|
|||
uppercaseRune := string(unicode.ToUpper(firstRune))
|
||||
return fmt.Sprintf("%s.%s%s", class, string(uppercaseRune), function[runeLen:]), nil
|
||||
}
|
||||
|
||||
func (r *request) ReadRequest(args interface{}) error {
|
||||
if err := r.CodecRequest.ReadRequest(args); err != nil {
|
||||
return errors.New("couldn't unmarshal an argument. Ensure arguments are valid and properly formatted. See documentation for example calls")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue