aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-10-08 20:35:34 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-10-29 06:20:48 -0700
commit89412fda775aecdedf4047355f2c45b48334a285 (patch)
tree1aa3818600ec8bdead689f0a60bf507b4c259370 /lib/std/debug.zig
parent69b54b0cd12fb90f8ff101bc66e433a81d4b8409 (diff)
downloadzig-89412fda775aecdedf4047355f2c45b48334a285.tar.gz
zig-89412fda775aecdedf4047355f2c45b48334a285.zip
std.Io: implement fileStat
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index f6287135e5..7e09bfec8a 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -82,6 +82,7 @@ pub const SelfInfoError = error{
/// The required debug info could not be read from disk due to some IO error.
ReadFailed,
OutOfMemory,
+ Canceled,
Unexpected,
};
@@ -691,6 +692,7 @@ pub noinline fn writeCurrentStackTrace(options: StackUnwindOptions, writer: *Wri
error.UnsupportedDebugInfo => "unwind info unsupported",
error.ReadFailed => "filesystem error",
error.OutOfMemory => "out of memory",
+ error.Canceled => "operation canceled",
error.Unexpected => "unexpected error",
};
if (it.stratOk(options.allow_unsafe_unwind)) {
@@ -1079,7 +1081,7 @@ fn printSourceAtAddress(gpa: Allocator, debug_info: *SelfInfo, writer: *Writer,
error.UnsupportedDebugInfo,
error.InvalidDebugInfo,
=> .unknown,
- error.ReadFailed, error.Unexpected => s: {
+ error.ReadFailed, error.Unexpected, error.Canceled => s: {
tty_config.setColor(writer, .dim) catch {};
try writer.print("Failed to read debug info from filesystem, trace may be incomplete\n\n", .{});
tty_config.setColor(writer, .reset) catch {};