mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
api/msgpack-rpc: Improve error infrastructure
- Add error type information to `Error` - Rename `set_api_error` to `api_set_error` for consistency with other api_* functions/macros. - Refactor the api_set_error macro to accept formatted strings and error types - Improve error messages - Wrap error messages with gettext macro - Refactor msgpack-rpc serialization to transform Error instances into [type, message] arrays - Add error type information to API metadata - Normalize nvim->client and client->nvim error handling(change channel_send_call to accept an Error pointer instead of the `errored` boolean pointer) - Use macro to initialize Error structures
This commit is contained in:
@@ -116,7 +116,7 @@ Window tabpage_get_window(Tabpage tabpage, Error *err)
|
||||
/// @return true if the tab page is valid, false otherwise
|
||||
Boolean tabpage_is_valid(Tabpage tabpage)
|
||||
{
|
||||
Error stub = {.set = false};
|
||||
Error stub = ERROR_INIT;
|
||||
return find_tab_by_handle(tabpage, &stub) != NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user