# Error handling strategies

**URL:** <https://ziggit.dev/t/error-handling-strategies/14514>\
**Category:** Explain\
**Tags:** error-handling\
**Created:** [March 4, 2026, 6:23pm UTC](https://ziggit.dev/t/error-handling-strategies/14514 "2026-03-04T18:23:56Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![dee0xeed](https://ziggit.dev/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@dee0xeed](https://ziggit.dev/u/dee0xeed)\
**Post date:** [March 7, 2026, 8:26pm UTC](https://ziggit.dev/t/error-handling-strategies/14514/9 "2026-03-07T20:26:20Z")

</div>

not shure, but probably this

> [@Managing file reading, closing + buffer allocation and deallocation](https://ziggit.dev/t/managing-file-reading-closing-buffer-allocation-and-deallocation/2389/9):
>
> Of course! So, the rule number one: if I just want to do some cleanup (close files/dirs, deallocate things and so on), I simply put defer right after each operation that needs cleanup given that I acquire a resource with try getSomeThing(). Did I get you right (regarding first part of the answer)?

may be helpful

---

_[View the full topic](https://ziggit.dev/t/error-handling-strategies/14514)._
