0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.0.1423: error in return not caught by try/catch

Problem:    Error in return not caught by try/catch.
Solution:   Call update_force_abort(). (Yasuhiro Matsomoto, closes #2483)
This commit is contained in:
Bram Moolenaar
2017-12-23 17:26:11 +01:00
parent 45a0000d5c
commit fabaf753e2
6 changed files with 24 additions and 2 deletions

View File

@@ -2972,6 +2972,9 @@ ex_return(exarg_T *eap)
/* It's safer to return also on error. */
else if (!eap->skip)
{
/* In return statement, cause_abort should be force_abort. */
update_force_abort();
/*
* Return unless the expression evaluation has been cancelled due to an
* aborting error, an interrupt, or an exception.