Mercurial > vim
comparison src/userfunc.c @ 13096:30f9a62f5f51 v8.0.1423
patch 8.0.1423: error in return not caught by try/catch
commit https://github.com/vim/vim/commit/fabaf753e26df5a89a854673d14c15a1fa6b321a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 23 17:26:11 2017 +0100
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 https://github.com/vim/vim/issues/2483)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 23 Dec 2017 17:30:05 +0100 |
parents | 41e46caf1030 |
children | ac42c4b11dbc |
comparison
equal
deleted
inserted
replaced
13095:7fc56b475604 | 13096:30f9a62f5f51 |
---|---|
2970 clear_tv(&rettv); | 2970 clear_tv(&rettv); |
2971 } | 2971 } |
2972 /* It's safer to return also on error. */ | 2972 /* It's safer to return also on error. */ |
2973 else if (!eap->skip) | 2973 else if (!eap->skip) |
2974 { | 2974 { |
2975 /* In return statement, cause_abort should be force_abort. */ | |
2976 update_force_abort(); | |
2977 | |
2975 /* | 2978 /* |
2976 * Return unless the expression evaluation has been cancelled due to an | 2979 * Return unless the expression evaluation has been cancelled due to an |
2977 * aborting error, an interrupt, or an exception. | 2980 * aborting error, an interrupt, or an exception. |
2978 */ | 2981 */ |
2979 if (!aborting()) | 2982 if (!aborting()) |