In this chapter, we have learned a lot about error control. Do the best you can to write an application that is very stable. The previous chapter about Architecture and Unit Testing can help you to design your system for changing requirements and to test it using automated tests.
For all situations out of your control, you now have the tools to get the best out of it. Try to avoid these situations and design a nice dialog with some details about the exception to give your customers and users the feeling that this will be fixed soon.
There are a lot of free materials about error handling on the Web, especially discussions about clean code, in blogs of members of the .NET community. It is well worth reading them, but it is most important to go through your code and to think about what can go wrong and how you can improve it. The materials that are most important in this process are as follows:
Static code analysis: http://bit.ly/knvNkf
Code Contracts: http://bit.ly...