mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 06:18:16 +00:00
vim-patch:8.2.3448: :endtry after function call that throws not found
Problem: :endtry after function call that throws not found.
Solution: Do check for following :endtry if an exception is being thrown.
(closes vim/vim#8889)
1d34189ecb
Nvim obsoleted did_throw; check current_exception is not NULL instead.
This commit is contained in:
@@ -3017,11 +3017,12 @@ void ex_call(exarg_T *eap)
|
||||
}
|
||||
}
|
||||
|
||||
// When inside :try we need to check for following "| catch".
|
||||
if (!aborting() && (!failed || eap->cstack->cs_trylevel > 0)) {
|
||||
// When inside :try we need to check for following "| catch" or "| endtry".
|
||||
// Not when there was an error, but do check if an exception was thrown.
|
||||
if ((!aborting() || current_exception != NULL) && (!failed || eap->cstack->cs_trylevel > 0)) {
|
||||
// Check for trailing illegal characters and a following command.
|
||||
if (!ends_excmd(*arg)) {
|
||||
if (!failed) {
|
||||
if (!failed && !aborting()) {
|
||||
emsg_severe = true;
|
||||
emsg(_(e_trailing));
|
||||
}
|
||||
|
Reference in New Issue
Block a user