diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-09-18 22:37:59 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-09-18 22:37:59 -0300 |
commit | 53d15c2c25199f8e44e9a8a74898f06a85e7c83b (patch) | |
tree | c7d53772706ed78bee255100b328db11e3dc867e /src/nvim/os/provider.c | |
parent | 67a16384a46c5eb51ba43d9150e95a1742cffbde (diff) | |
parent | 4a8b52ea08bb5cf501cd20bce4744ae6c7edd9b1 (diff) | |
download | rneovim-53d15c2c25199f8e44e9a8a74898f06a85e7c83b.tar.gz rneovim-53d15c2c25199f8e44e9a8a74898f06a85e7c83b.tar.bz2 rneovim-53d15c2c25199f8e44e9a8a74898f06a85e7c83b.zip |
Merge PR #1199 'Improvements to API error handling'
Diffstat (limited to 'src/nvim/os/provider.c')
-rw-r--r-- | src/nvim/os/provider.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/os/provider.c b/src/nvim/os/provider.c index 2e7a677793..d4fffaa053 100644 --- a/src/nvim/os/provider.c +++ b/src/nvim/os/provider.c @@ -107,12 +107,11 @@ Object provider_call(char *method, Array args) return NIL; } - bool error = false; - Object result = NIL; - channel_send_call(f->channel_id, method, args, &result, &error); + Error err = ERROR_INIT; + Object result = NIL = channel_send_call(f->channel_id, method, args, &err); - if (error) { - vim_report_error(result.data.string); + if (err.set) { + vim_report_error(cstr_as_string(err.msg)); api_free_object(result); return NIL; } |