api: make try_end clean-up after an exception properly. Fixes #10809

Otherwise `force_abort` will cause an emsg() higher on the stack
to be converted to an exception, even though it is outside any
try/catch.
This commit is contained in:
Björn Linse
2019-09-02 21:59:58 +02:00
parent 099445cc07
commit 7e07efaff4
2 changed files with 33 additions and 0 deletions

View File

@@ -125,6 +125,7 @@ bool try_end(Error *err)
// Set by emsg(), affects aborting(). See also enter_cleanup().
did_emsg = false;
force_abort = false;
if (got_int) {
if (current_exception) {