neoneo-go/pkg/vm
Anna Shaleva f57187e611 vm: throw unhandled exception with message instead of panic
The result is the same HALT state, but the exception message is the real
one got from user. Changes ported from C#:

1. Throw exception: 59b8ac73d2/src/neo-vm/ExecutionEngine.cs (L1448)
2. Prettify message: https://github.com/neo-project/neo-vm/blob/master/src/neo-vm/VMUnhandledException.cs#L28

The result is that instead of
```
2021-03-31T17:02:54.508+0300	WARN	contract invocation failed	{"tx": "2aefeb705f3a609df8767d9b45e036b9dd1eb77407e5732375981915668889b8", "block": 30640, "error": "error encountered at instruction 970 (THROW): runtime error: invalid memory address or nil pointer dereference"}
```

we'll get
```
2021-03-31T17:33:56.299+0300	WARN	contract invocation failed	{"tx": "2aefeb705f3a609df8767d9b45e036b9dd1eb77407e5732375981915668889b8", "block": 30640, "error": "error encountered at instruction 970 (THROW): unhandled exception: No authorization."}
```
in the node logs.
2021-03-31 19:37:52 +03:00
..
cli core: remove System.Binary.[Serialize, Deserialize] syscalls 2021-03-10 19:24:19 +03:00
emit vm: return more detailed error from emit.Array 2021-03-26 20:44:32 +03:00
opcode vm: implement SQRT opcode 2021-03-01 16:58:53 +03:00
stackitem stackitem: escape control characters in ToJSON() 2021-03-02 10:47:02 +03:00
testdata vm/testdata: update C# json tests 2021-03-01 16:58:53 +03:00
context.go vm: add instruction correctness check 2021-02-09 22:31:26 +03:00
contract_checks.go core: refactor Neo.Crypto.CheckMultisigWithECDsaSecpr1 2021-03-10 21:46:05 +03:00
contract_checks_test.go core: refactor Neo.Crypto.CheckMultisigWithECDsaSecpr1 2021-03-10 21:46:05 +03:00
debug_test.go vm: fix debugger and add tests 2020-08-18 11:26:27 +03:00
exception.go stackitem: change Bool() to TryBool(), prepare for its failures 2020-08-21 20:55:20 +03:00
interop.go core: remove System.Binary.[Serialize, Deserialize] syscalls 2021-03-10 19:24:19 +03:00
interop_iterators.go core,vm: remove System.Enumerator.* interops 2021-01-15 21:11:32 +03:00
json_test.go smartcontract: move flags to a separate package 2021-01-14 17:52:09 +03:00
opcodebench_test.go vm: add opcode benchmark 2020-10-15 16:27:36 +03:00
ref_counter.go vm: move StackItem to a separate package 2020-06-08 13:27:08 +03:00
ref_counter_test.go vm: move StackItem to a separate package 2020-06-08 13:27:08 +03:00
slot.go vm: allow to initialize static slot in method 2020-07-27 13:00:35 +03:00
slot_test.go vm: allow to initialize static slot in method 2020-07-27 13:00:35 +03:00
stack.go vm: optimize reversing items on the stack 2020-10-15 16:19:59 +03:00
stack_test.go vm: allow to convert stack to a slice 2020-07-31 16:07:16 +03:00
state.go remove github.com/pkg/errors from dependencies 2020-08-07 12:21:52 +03:00
state_test.go core, vm: store VMState as byte instead of string 2020-07-29 10:14:08 +03:00
vm.go vm: throw unhandled exception with message instead of panic 2021-03-31 19:37:52 +03:00
vm_test.go core: remove System.Binary.[Serialize, Deserialize] syscalls 2021-03-10 19:24:19 +03:00