From 4839c4b037d401393bbc87143d663e115c71242e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 12:14:58 -0300 Subject: idioms #2, formats that cannot overflow say so: a bufPrint or a fixed writer whose buffer provably holds the text (numbers, a 128-byte name, a short phrase) is catch unreachable with its reason, not a catch "" or a stand-in sentence nobody can reach, and dump.check takes its 256-byte why as such Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/9p_io.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/9p_io.zig') diff --git a/src/9p_io.zig b/src/9p_io.zig index 70bd0bbf..72548d2a 100644 --- a/src/9p_io.zig +++ b/src/9p_io.zig @@ -355,7 +355,7 @@ pub const Listener = struct { const refused = l.refused.swap(0, .acq_rel); if (refused != 0) { var why: [64]u8 = undefined; - pardes.ctlfs.events.notePath(core, "err -", std.fmt.bufPrint(&why, "9p: too many connections ({d} turned away)", .{refused}) catch "9p: too many connections"); + pardes.ctlfs.events.notePath(core, "err -", std.fmt.bufPrint(&why, "9p: too many connections ({d} turned away)", .{refused}) catch unreachable); // a u32 fits 64 } if (!core.fs.news) return; core.fs.news = false; -- cgit v1.3