aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/provider.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-09-11 10:35:52 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-09-12 13:50:07 -0300
commit15ca58d79f8cc8565c1a2b2581029cf7901b5fbd (patch)
treec19f4f377fbb93416c476d8a146caf248f92b414 /src/nvim/os/provider.c
parentd29b62daabd88e3c7ee9a979f4feae5612e3fbaf (diff)
downloadrneovim-15ca58d79f8cc8565c1a2b2581029cf7901b5fbd.tar.gz
rneovim-15ca58d79f8cc8565c1a2b2581029cf7901b5fbd.tar.bz2
rneovim-15ca58d79f8cc8565c1a2b2581029cf7901b5fbd.zip
api: Implement `vim_report_error` function
This function is used to report errors caused by remote functions called by channel_send_call
Diffstat (limited to 'src/nvim/os/provider.c')
-rw-r--r--src/nvim/os/provider.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/nvim/os/provider.c b/src/nvim/os/provider.c
index e56e33aa1a..9d8f6f297c 100644
--- a/src/nvim/os/provider.c
+++ b/src/nvim/os/provider.c
@@ -102,7 +102,7 @@ Object provider_call(char *method, Array args)
sizeof(buf),
"Provider for method \"%s\" is not available",
method);
- report_error(buf);
+ vim_report_error(cstr_as_string(buf));
api_free_array(args);
return NIL;
}
@@ -112,7 +112,7 @@ Object provider_call(char *method, Array args)
channel_send_call(f->channel_id, method, args, &result, &error);
if (error) {
- report_error(result.data.string.data);
+ vim_report_error(result.data.string);
api_free_object(result);
return NIL;
}
@@ -151,9 +151,3 @@ static Feature * find_feature(char *name)
return NULL;
}
-
-static void report_error(char *str)
-{
- vim_err_write((String) {.data = str, .size = strlen(str)});
- vim_err_write((String) {.data = "\n", .size = 1});
-}