aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 002d9da781..03567ddfd8 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -1162,11 +1162,12 @@ Array nvim_call_atomic(uint64_t channel_id, Array calls, Error *err)
}
Array args = call.items[1].data.array;
- MsgpackRpcRequestHandler handler = msgpack_rpc_get_handler_for(name.data,
- name.size);
- if (handler.fn == msgpack_rpc_handle_missing_method) {
- api_set_error(&nested_error, kErrorTypeException, "Invalid method: %s",
- name.size > 0 ? name.data : "<empty>");
+ MsgpackRpcRequestHandler handler =
+ msgpack_rpc_get_handler_for(name.data,
+ name.size,
+ &nested_error);
+
+ if (ERROR_SET(&nested_error)) {
break;
}
Object result = handler.fn(channel_id, args, &nested_error);