mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-24 09:25:21 +00:00
vm: specify syscall ID when panicing on syscall invocation
It's convinient to know the failing syscall without dumping smartcontract instructions.
This commit is contained in:
parent
1bd3ee299c
commit
793f27084b
1 changed files with 1 additions and 1 deletions
|
@ -1304,7 +1304,7 @@ func (v *VM) execute(ctx *Context, op opcode.Opcode, parameter []byte) (err erro
|
||||||
interopID := GetInteropID(parameter)
|
interopID := GetInteropID(parameter)
|
||||||
err := v.SyscallHandler(v, interopID)
|
err := v.SyscallHandler(v, interopID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("failed to invoke syscall: %s", err))
|
panic(fmt.Sprintf("failed to invoke syscall %d: %s", interopID, err))
|
||||||
}
|
}
|
||||||
|
|
||||||
case opcode.RET:
|
case opcode.RET:
|
||||||
|
|
Loading…
Reference in a new issue