Ten tips for handling .NET exceptions exceptionally

from Builder

1. Use one try and many catches
2. Order catch blocks from specific to general
3. Always ensure you reach a valid state
4. Document what you can throw
5. Throw the closest match
6. Never throw in the course of normal use
7. Extend the ApplicationException, not the base Exception, class
8. Use the inner exception property when rethrowing
9. Do not create lightly
10. Name appropriately

Comments

Popular posts from this blog

Maven Crash Course - Learn Power Query, Power Pivot & DAX in 15 Minutes

"Data Prep & Exploratory Data Analysis" course by Maven Analytics

Oracle Cloud Infrastructure 2024 Generative AI Professional Course & Certification Exam (1Z0-1127-24)