C#: Throwing Custom Exception Best Practices
Based on my experience with libraries, you should wrap everything (that you can anticipate) in a FooException for a few reasons: People know it came from your classes, or at least, their usage of them. If they see FileNotFoundException they may be looking all over for it. You’re helping them narrow it down. (I realize … Read more