mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
core: detalize errors during contract.LoadToken and contract.Call
This commit is contained in:
parent
6eee868b4a
commit
4f1c50373f
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ func LoadToken(ic *interop.Context) func(id int32) error {
|
|||
}
|
||||
cs, err := ic.GetContract(tok.Hash)
|
||||
if err != nil {
|
||||
return fmt.Errorf("contract not found: %w", err)
|
||||
return fmt.Errorf("token contract %s not found: %w", tok.Hash.StringLE(), err)
|
||||
}
|
||||
return callInternal(ic, cs, tok.Method, tok.CallFlag, tok.HasReturn, args)
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ func Call(ic *interop.Context) error {
|
|||
}
|
||||
cs, err := ic.GetContract(u)
|
||||
if err != nil {
|
||||
return fmt.Errorf("contract not found: %w", err)
|
||||
return fmt.Errorf("called contract %s not found: %w", u.StringLE(), err)
|
||||
}
|
||||
if strings.HasPrefix(method, "_") {
|
||||
return errors.New("invalid method name (starts with '_')")
|
||||
|
|
Loading…
Reference in a new issue