Error handling in .NET Part 2: The Try and the Result patterns

Alternatives to the Exception pattern In my last article, I wrote about the exception pattern. It has great benefits but also great performance implications. Because of these, and following Microsoft recommendations, I’ve also written that we should only use them for exceptional errors. So what do we do when we have to handle an error? Let’s get to it. The “Check and Do” pattern Disclaimer: I’ll include this pattern just for completeness....

February 1, 2024 · 6 min

Error handling in .NET Part 1: The exception pattern

Exception pattern I had some discussions about exceptions at work, especially for performance reasons: We maintain a platform that has both high volumetry and low latency constraints. The document made by one of my teammates (Hi Olivier!👋) included observations that I didn’t know or that I heard about, but never had the opportunity to verify. This made me want to dig a bit deeper and learn more about this topic. This article is the result of my findings....

January 19, 2024 · 9 min