<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Error Reporting on MacWorks</title><link>https://macworks.dev/tags/error-reporting/</link><description>Recent content in Error Reporting on MacWorks</description><generator>Hugo</generator><language>en</language><atom:link href="https://macworks.dev/tags/error-reporting/index.xml" rel="self" type="application/rss+xml"/><item><title>2026-05-03</title><link>https://macworks.dev/docs/archives/blogs/engineer-blogs-2026-05-03/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://macworks.dev/docs/archives/blogs/engineer-blogs-2026-05-03/</guid><description>&lt;h1 id="engineering-reads--2026-05-03"&gt;Engineering Reads — 2026-05-03&lt;a class="anchor" href="#engineering-reads--2026-05-03"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="the-big-idea"&gt;The Big Idea&lt;a class="anchor" href="#the-big-idea"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Effective error reporting often demands a shift in perspective: instead of decorating errors at the point of failure, we should accumulate context implicitly along the happy path. This telescopic, block-scoped approach minimizes developer friction, though it surfaces new challenges when expected errors (like I/O cancellation) are caught and handled upstream rather than fatally reported.&lt;/p&gt;
&lt;h2 id="deep-reads"&gt;Deep Reads&lt;a class="anchor" href="#deep-reads"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Minimal Viable Zig Error Contexts&lt;/strong&gt; · Matklad · &lt;a href="https://matklad.github.io/2026/05/03/zig-error-context.html"&gt;matklad.github.io&lt;/a&gt;
Zig&amp;rsquo;s strongly-typed error codes solve error &lt;em&gt;handling&lt;/em&gt;, but its idiomatic &amp;ldquo;Diagnostics sink&amp;rdquo; pattern for error &lt;em&gt;reporting&lt;/em&gt; introduces too much friction for lightweight or script-like code. To avoid the poor debuggability of naked &lt;code&gt;try&lt;/code&gt; statements or the sheer verbosity of custom error wrappers, Matklad proposes a &amp;ldquo;worse-is-better&amp;rdquo; pattern that logs key-value context via &lt;code&gt;errdefer&lt;/code&gt; at the block level. This creates a telescopic context across the call stack without cluttering the happy path or requiring modifications to individual fallible operations. However, this technique has a severe tradeoff: it unconditionally logs context even if the error is later handled gracefully, which is problematic in Zig 0.16 where serendipitous IO cancellation is treated as a recoverable error. Systems engineers and language designers should read this for a practical exploration of how the ergonomics of context gathering shape the readability of our code.&lt;/p&gt;</description></item></channel></rss>