mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
msgpack-rpc: handle failure to convert method arguments #2664
This commit is contained in:
@@ -306,6 +306,17 @@ Object msgpack_rpc_handle_missing_method(uint64_t channel_id,
|
||||
return NIL;
|
||||
}
|
||||
|
||||
/// Handler executed when malformated arguments are passed
|
||||
Object msgpack_rpc_handle_invalid_arguments(uint64_t channel_id,
|
||||
uint64_t request_id,
|
||||
Array args,
|
||||
Error *error)
|
||||
{
|
||||
snprintf(error->msg, sizeof(error->msg), "Invalid method arguments");
|
||||
error->set = true;
|
||||
return NIL;
|
||||
}
|
||||
|
||||
/// Serializes a msgpack-rpc request or notification(id == 0)
|
||||
void msgpack_rpc_serialize_request(uint64_t request_id,
|
||||
String method,
|
||||
|
Reference in New Issue
Block a user