Exception Handling
- slide 30 : 30
Recommendations about exception handling
Exception classes
Prefer predefined exception classes instead of programming your own exception classes
Consider specialization of existing and specific exception classes
Catching
Do not catch exceptions for which there is no cure
Leave such exceptions to earlier (outer) parts of the call-chain
Burying
Avoid empty handler exceptions - exception burrying
If you touch an exception without handling it, always rethrow it
The C# Exception class hierarchy