Add error return trace (#882)
This commit is contained in:
parent
a574ac68ba
commit
20baa592eb
@ -3049,6 +3049,9 @@ fn processMessage(server: *Server, message: Message) Error!void {
|
|||||||
const params: ParamsType = tres.parse(ParamsType, message.params().?, server.arena.allocator()) catch return error.InternalError;
|
const params: ParamsType = tres.parse(ParamsType, message.params().?, server.arena.allocator()) catch return error.InternalError;
|
||||||
const response = handler(server, params) catch |err| {
|
const response = handler(server, params) catch |err| {
|
||||||
log.err("got {} error while handling {s}", .{ err, method });
|
log.err("got {} error while handling {s}", .{ err, method });
|
||||||
|
if (@errorReturnTrace()) |trace| {
|
||||||
|
std.debug.dumpStackTrace(trace.*);
|
||||||
|
}
|
||||||
return error.InternalError;
|
return error.InternalError;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user