From 20baa592eb62fb49ae2127f2bcacc5da98072087 Mon Sep 17 00:00:00 2001 From: Auguste Rame <19855629+SuperAuguste@users.noreply.github.com> Date: Tue, 3 Jan 2023 10:37:59 -0500 Subject: [PATCH] Add error return trace (#882) --- src/Server.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Server.zig b/src/Server.zig index 265f823..c644004 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -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 response = handler(server, params) catch |err| { log.err("got {} error while handling {s}", .{ err, method }); + if (@errorReturnTrace()) |trace| { + std.debug.dumpStackTrace(trace.*); + } return error.InternalError; };