core: specify method not found call error

It's useful for debugging and external users.
This commit is contained in:
Anna Shaleva 2021-10-28 17:41:35 +03:00
parent 4ab18d084a
commit 1a32fcb2dc

View file

@ -66,7 +66,7 @@ func Call(ic *interop.Context) error {
}
md := cs.Manifest.ABI.GetMethod(method, len(args))
if md == nil {
return errors.New("method not found")
return fmt.Errorf("method not found: %s/%d", method, len(args))
}
hasReturn := md.ReturnType != smartcontract.VoidType
if !hasReturn {