From 1a32fcb2dcc2a84cc3cc762e69cbac416a8edc9b Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Thu, 28 Oct 2021 17:41:35 +0300 Subject: [PATCH] core: specify `method not found` call error It's useful for debugging and external users. --- pkg/core/interop/contract/call.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/interop/contract/call.go b/pkg/core/interop/contract/call.go index c6f7c59c2..8389e4557 100644 --- a/pkg/core/interop/contract/call.go +++ b/pkg/core/interop/contract/call.go @@ -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 {