TGViewer
Everyday Unity Everyday Unity @everydayunity · 1.18K subscribers
Post #1989 176
Top 10 Dotnet Exception Anti-Patterns in C#

- Exceptions should be reserved for the truly exceptional
- Exceptions should include all information needed to react to them
- Exceptions should only be caught where they can be appropriately responded to
- Do not catch Exception or force others to catch it by throwing Exception
- Exceptions add to your cognitive workload as a developer and slow down your application and should be avoided when possible

https://newdevsguide.com/2022/11/06/exception-anti-patterns-in-csharp/

#exception #errorhandling
The New Dev's Guide Top 10 Dotnet Exception Anti-Patterns in C# In this article we'll explore the top 10 mistakes I see new and seasoned developers make with exception management in dotnet source code. These principles should be valid for all dotnet languages, but examples will be provided in C#.
  • 👍 2
More from @everydayunity
  1. Oct 2, 2026Customize Claude Code with mods in TypeScript You can now make mods for Claude cli and app…
  2. Sep 24, 2026Now you can change the effort mid session in new Claude. So the advice about caching from…
  3. Sep 24, 2026We were wondering in the comments what Claude reset does. Here is the answer https://www.r…
  4. Sep 22, 2026Introducing GPT‑6 Sol and Luna And better & cheaper sol and luna as an immediate response…
  5. Sep 22, 2026Introducing Claude Opus 5.5 \ Anthropic Cost and speed. Opus 5.5 requires less compute to…
  6. Sep 21, 2026Claude Code effort level and model selection effort means more than just "thinking time."…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →