Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Error Handling and Exceptions

Error Handling and Exceptions

Error handling is a difficult task for which the programmer needs all the help that can be provided.

—Bjarne Stroustrup, [Stroustrup94] §16.2

There are two ways to write error-free programs; only the third one works.

—Alan Perlis

The question isn’t whether or not we will make programming errors; the question is whether or not we will arrange for our compiler and tools to find them for us.

This section documents hard-won wisdom and best practices, some of them gained only after years and mountains of pain. Follow these rules and guidelines. Stick to them. When it comes to writing robust, safe, and secure software, we need all the help we can get.

Our vote for the most valuable Item in this section goes to Item 69: Establish a rational error handling policy, and follow it strictly.



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint