mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
api: Implement vim_report_error
function
This function is used to report errors caused by remote functions called by channel_send_call
This commit is contained in:
@@ -12796,13 +12796,17 @@ static void f_send_call(typval_T *argvars, typval_T *rettv)
|
||||
return;
|
||||
}
|
||||
|
||||
if (errored) {
|
||||
vim_report_error(result.data.string);
|
||||
goto end;
|
||||
}
|
||||
|
||||
Error conversion_error = {.set = false};
|
||||
if (errored || !object_to_vim(result, rettv, &conversion_error)) {
|
||||
EMSG(errored ?
|
||||
result.data.string.data :
|
||||
_("Error converting the call result"));
|
||||
if (!object_to_vim(result, rettv, &conversion_error)) {
|
||||
EMSG(_("Error converting the call result"));
|
||||
}
|
||||
|
||||
end:
|
||||
api_free_object(result);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user