
Defensive programming is a set of techniques/guidance on best practices to ensure your applications are secure, as bug free as possible, and respond gracefully to unexpected events (i.e. software exceptions).
Defensive programming is a set of techniques/guidance on best practices to ensure your applications are secure, as bug free as possible, and respond gracefully to unexpected events (i.e. software exceptions).
Whenever you are working with the Windows API, there is a better than average chance that you’ll have to deal with a Windows API Error Code. Within your code it is useful to be able to resolve this value to a more meaningful error message and, fortunately, the Windows API includes functionality to do just that.
What are exceptions? In .NET terms, exceptions provide a mechanism for enabling the raising/reporting of errors that may occur during the execution of the software. This tutorial covers exceptions and exception handling in detail.