mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 03:47:18 +00:00
vm: improve stack size related errors
No functional changes, just add more details to the error. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
effba1fa47
commit
d156cea24d
1 changed files with 2 additions and 2 deletions
|
@ -594,7 +594,7 @@ func (v *VM) execute(ctx *Context, op opcode.Opcode, parameter []byte) (err erro
|
|||
err = newError(ctx.ip, op, errRecover)
|
||||
} else if v.refs > MaxStackSize {
|
||||
v.state = vmstate.Fault
|
||||
err = newError(ctx.ip, op, "stack is too big")
|
||||
err = newError(ctx.ip, op, fmt.Sprintf("stack is too big: %d vs %d", int(v.refs), MaxStackSize))
|
||||
}
|
||||
}()
|
||||
|
||||
|
@ -1995,7 +1995,7 @@ func validateMapKey(key Element) {
|
|||
|
||||
func (v *VM) checkInvocationStackSize() {
|
||||
if len(v.istack) >= MaxInvocationStackSize {
|
||||
panic("invocation stack is too big")
|
||||
panic(fmt.Sprintf("invocation stack is too big: %d", len(v.istack)))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue