mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.3081: cannot catch errors in a channel command
Problem: Cannot catch errors in a channel command. Solution: Instead of skipping the error make it silent. (closes #8477)
This commit is contained in:
parent
576cb75ceb
commit
11a632d60b
@ -2545,7 +2545,8 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
|
|||||||
char_u *json = NULL;
|
char_u *json = NULL;
|
||||||
|
|
||||||
// Don't pollute the display with errors.
|
// Don't pollute the display with errors.
|
||||||
++emsg_skip;
|
// Do generate the errors so that try/catch works.
|
||||||
|
++emsg_silent;
|
||||||
if (!is_call)
|
if (!is_call)
|
||||||
{
|
{
|
||||||
ch_log(channel, "Evaluating expression '%s'", (char *)arg);
|
ch_log(channel, "Evaluating expression '%s'", (char *)arg);
|
||||||
@ -2581,7 +2582,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
|
|||||||
vim_free(json);
|
vim_free(json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--emsg_skip;
|
--emsg_silent;
|
||||||
if (tv == &res_tv)
|
if (tv == &res_tv)
|
||||||
clear_tv(tv);
|
clear_tv(tv);
|
||||||
else
|
else
|
||||||
|
@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3081,
|
||||||
/**/
|
/**/
|
||||||
3080,
|
3080,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user