do not panic on error response to workspace/configuration (#747)
This commit is contained in:
parent
28adef42c1
commit
e98aea61ea
@ -2644,6 +2644,7 @@ pub fn processJsonRpc(server: *Server, writer: anytype, json: []const u8) !void
|
|||||||
// Yes, String ids are officially supported by LSP
|
// Yes, String ids are officially supported by LSP
|
||||||
// but not sure how standard this "standard" really is
|
// but not sure how standard this "standard" really is
|
||||||
|
|
||||||
|
if (tree.root.Object.get("error")) |_| return;
|
||||||
const result = tree.root.Object.get("result").?.Array;
|
const result = tree.root.Object.get("result").?.Array;
|
||||||
|
|
||||||
inline for (std.meta.fields(Config)) |field, index| {
|
inline for (std.meta.fields(Config)) |field, index| {
|
||||||
@ -2661,8 +2662,7 @@ pub fn processJsonRpc(server: *Server, writer: anytype, json: []const u8) !void
|
|||||||
if (s.len == 0) {
|
if (s.len == 0) {
|
||||||
if (field.field_type == ?[]const u8) {
|
if (field.field_type == ?[]const u8) {
|
||||||
break :blk null;
|
break :blk null;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
break :blk s;
|
break :blk s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user