From ae9b90cf6ea1d3f214a9058be8e147911b745f00 Mon Sep 17 00:00:00 2001 From: Sahnvour Date: Fri, 15 Mar 2019 21:45:38 +0100 Subject: [PATCH] print a message instead of returning an error when debug info comes from a source file not found (for example compiled on another computer) --- std/debug.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/std/debug.zig b/std/debug.zig index 96b861e4a79b0fc2a1f48a9196cc2da1569e777e..c85a98205967466d1d90f49dff97856300194b9d 100644 --- a/std/debug.zig +++ b/std/debug.zig @@ -478,6 +478,11 @@ fn printSourceAtAddressWindows(di: *DebugInfo, out_stream: var, relocated_addres } } else |err| switch (err) { error.EndOfFile => {}, + error.FileNotFound => { + setTtyColor(TtyColor.Dim); + try out_stream.write("file not found\n\n"); + setTtyColor(TtyColor.White); + }, else => return err, } } else { -- 2.54.0