aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/tabpage.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-09-17 08:56:59 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-09-18 21:30:31 -0300
commit4a8b52ea08bb5cf501cd20bce4744ae6c7edd9b1 (patch)
treec7d53772706ed78bee255100b328db11e3dc867e /src/nvim/api/tabpage.c
parent67a16384a46c5eb51ba43d9150e95a1742cffbde (diff)
downloadrneovim-4a8b52ea08bb5cf501cd20bce4744ae6c7edd9b1.tar.gz
rneovim-4a8b52ea08bb5cf501cd20bce4744ae6c7edd9b1.tar.bz2
rneovim-4a8b52ea08bb5cf501cd20bce4744ae6c7edd9b1.zip
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
Diffstat (limited to 'src/nvim/api/tabpage.c')
-rw-r--r--src/nvim/api/tabpage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/tabpage.c b/src/nvim/api/tabpage.c
index 91020d6850..72168d936a 100644
--- a/src/nvim/api/tabpage.c
+++ b/src/nvim/api/tabpage.c
@@ -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;
}