mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 18:36:30 +00:00
api/internal: Remove set
field from Error type.
This commit is contained in:
@@ -397,7 +397,7 @@ static void handle_request(Channel *channel, msgpack_object *request)
|
||||
Error error = ERROR_INIT;
|
||||
msgpack_rpc_validate(&request_id, request, &error);
|
||||
|
||||
if (error.set) {
|
||||
if (ERROR_SET(&error)) {
|
||||
// Validation failed, send response with error
|
||||
if (channel_write(channel,
|
||||
serialize_response(channel->id,
|
||||
|
@@ -475,7 +475,7 @@ Object msgpack_rpc_handle_missing_method(uint64_t channel_id,
|
||||
Array args,
|
||||
Error *error)
|
||||
{
|
||||
_api_set_error(error, error->type, "Invalid method name");
|
||||
_api_set_error(error, kErrorTypeException, "Invalid method name");
|
||||
return NIL;
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ Object msgpack_rpc_handle_invalid_arguments(uint64_t channel_id,
|
||||
Array args,
|
||||
Error *error)
|
||||
{
|
||||
_api_set_error(error, error->type, "Invalid method arguments");
|
||||
_api_set_error(error, kErrorTypeException, "Invalid method arguments");
|
||||
return NIL;
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ void msgpack_rpc_serialize_response(uint64_t response_id,
|
||||
msgpack_pack_int(pac, 1);
|
||||
msgpack_pack_uint64(pac, response_id);
|
||||
|
||||
if (err->set) {
|
||||
if (ERROR_SET(err)) {
|
||||
// error represented by a [type, message] array
|
||||
msgpack_pack_array(pac, 2);
|
||||
msgpack_rpc_from_integer(err->type, pac);
|
||||
|
Reference in New Issue
Block a user