Patch 8.2.3081
Problem: Cannot catch errors in a channel command.
Solution: Instead of skipping the error make it silent. (closes #8477)
Files: src/channel.c
*** ../vim-8.2.3080/src/channel.c 2021-06-27 22:03:28.637707737 +0200
--- src/channel.c 2021-06-30 21:58:59.852656536 +0200
***************
*** 2545,2551 ****
char_u *json = NULL;
// Don't pollute the display with errors.
! ++emsg_skip;
if (!is_call)
{
ch_log(channel, "Evaluating expression '%s'", (char *)arg);
--- 2545,2552 ----
char_u *json = NULL;
// Don't pollute the display with errors.
! // Do generate the errors so that try/catch works.
! ++emsg_silent;
if (!is_call)
{
ch_log(channel, "Evaluating expression '%s'", (char *)arg);
***************
*** 2581,2587 ****
vim_free(json);
}
}
! --emsg_skip;
if (tv == &res_tv)
clear_tv(tv);
else
--- 2582,2588 ----
vim_free(json);
}
}
! --emsg_silent;
if (tv == &res_tv)
clear_tv(tv);
else
*** ../vim-8.2.3080/src/version.c 2021-06-30 21:30:07.496195277 +0200
--- src/version.c 2021-06-30 21:59:28.384600580 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3081,
/**/
--
Q: Should I clean my house or work on Vim?
A: Whatever contains more bugs.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202106302001.15UK1TAP1541494%40masaka.moolenaar.net.