Implement error handling in the user interface.
Create and implement custom error messages.
Create and implement custom error handlers.
Raise and handle errors.
The exception classes provided by the .NET Framework, combined with the custom messages created when you create a new Exception object to throw or rethrow exceptions, should suffice for most of your exception handling requirements. In some cases, however, you might need exception types that are specific to the problem you are solving.
Using ApplicationException as a Base Class for Custom Exceptions Although you can derive custom exception classes directly from the Exception class, Microsoft recommends that you derive custom exception classes ...