# Newbie: idiom to add information to error

**URL:** <https://ziggit.dev/t/newbie-idiom-to-add-information-to-error/10214>\
**Category:** Help\
**Tags:** language\
**Created:** [May 22, 2025, 4:23pm UTC](https://ziggit.dev/t/newbie-idiom-to-add-information-to-error/10214 "2025-05-22T16:23:57Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![00JCIV00](https://ziggit.dev/user_avatar/ziggit.dev/00jciv00/32/1069_2.png) [@00JCIV00](https://ziggit.dev/u/00JCIV00)\
**Post date:** [May 22, 2025, 6:45pm UTC](https://ziggit.dev/t/newbie-idiom-to-add-information-to-error/10214/5 "2025-05-22T18:45:27Z")

</div>

This is commonly referred to as the “Diagnostics” pattern. There are several examples in Zig’s stdlib. Here’s one for `std.json`: [std.json.Diagnostics](https://ziglang.org/documentation/master/std/#std.json.Diagnostics).

---

_[View the full topic](https://ziggit.dev/t/newbie-idiom-to-add-information-to-error/10214)._
