mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
Merge pull request #19843 from zeertzjq/vim-9.0.0227
vim-patch:8.2.3946,9.0.0227: internal error improvements
This commit is contained in:
@@ -830,8 +830,15 @@ static bool semsgv(const char *fmt, va_list ap)
|
|||||||
/// detected when fuzzing vim.
|
/// detected when fuzzing vim.
|
||||||
void iemsg(const char *s)
|
void iemsg(const char *s)
|
||||||
{
|
{
|
||||||
|
if (emsg_not_now()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
emsg(s);
|
emsg(s);
|
||||||
#ifdef ABORT_ON_INTERNAL_ERROR
|
#ifdef ABORT_ON_INTERNAL_ERROR
|
||||||
|
set_vim_var_string(VV_ERRMSG, s, -1);
|
||||||
|
msg_putchar('\n'); // avoid overwriting the error message
|
||||||
|
ui_flush();
|
||||||
abort();
|
abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -841,11 +848,17 @@ void iemsg(const char *s)
|
|||||||
/// detected when fuzzing vim.
|
/// detected when fuzzing vim.
|
||||||
void siemsg(const char *s, ...)
|
void siemsg(const char *s, ...)
|
||||||
{
|
{
|
||||||
|
if (emsg_not_now()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, s);
|
va_start(ap, s);
|
||||||
(void)semsgv(s, ap);
|
(void)semsgv(s, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
#ifdef ABORT_ON_INTERNAL_ERROR
|
#ifdef ABORT_ON_INTERNAL_ERROR
|
||||||
|
msg_putchar('\n'); // avoid overwriting the error message
|
||||||
|
ui_flush();
|
||||||
abort();
|
abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -257,6 +257,7 @@ endfunc
|
|||||||
func EarlyExit(test)
|
func EarlyExit(test)
|
||||||
" It's OK for the test we use to test the quit detection.
|
" It's OK for the test we use to test the quit detection.
|
||||||
if a:test != 'Test_zz_quit_detected()'
|
if a:test != 'Test_zz_quit_detected()'
|
||||||
|
call add(v:errors, v:errmsg)
|
||||||
call add(v:errors, 'Test caused Vim to exit: ' . a:test)
|
call add(v:errors, 'Test caused Vim to exit: ' . a:test)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user