This section presents guidelines for writing code that implements a well-designed set of error handling. These guidelines should result in software that is robust and reliable, and software run-time errors should be easier to diagnose and resolve. The best practices are grouped into the following categories: Creating Exceptions, Handling Exceptions, and Globalization. For example, a File Stream class exposes another way of determining whether the end of the file has been reached. This avoids the exception that is thrown if you read past the end of the file. Avoid returning a null value from functions to indicate an error condition.
Sunday, December 27, 2009
Subscribe to:
Post Comments (Atom)


0 comments:
Post a Comment