diff options
-rw-r--r-- | examples/exception-handler.c | 2 | ||||
-rw-r--r-- | vm.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/examples/exception-handler.c b/examples/exception-handler.c index 1e722ec..a9a0299 100644 --- a/examples/exception-handler.c +++ b/examples/exception-handler.c @@ -30,7 +30,7 @@ static const char *program = MULTILINE_STRING( doesnotexist(); } - fail(); + map([1], x => fail(x)); %} ); @@ -2278,6 +2278,8 @@ uc_vm_execute_chunk(uc_vm_t *vm) while (!uc_vm_handle_exception(vm)) { /* no further callframe to pop, report unhandled exception and terminate */ if (vm->callframes.count <= 1) { + uc_vm_reset_callframes(vm); + if (vm->exhandler) vm->exhandler(vm, &vm->exception); |