Zombyboy err… ressurects an old meme:
Here are the rules:
1. Grab the nearest book.
2. Open the book to page 123.
3. Find the fifth sentence.
4. Post the text of the next 3 sentences on your blog along with these instructions.
5. Don’t you dare dig for that “cool” or “intellectual” book in your closet! I know you were thinking about it! Just pick up whatever is closest.
Therefore, one call to DB::isError() is still necessary in your program to see whether the connection succeeded. Once that’s taken care of, however, you can call setErrorHandling() and not scatter the rest of your program with DB::isError() calls. The section “Fixing Database Errors” in Chapter 12 explains how to have setErrorHandling() print out a customized message when there is a database error.
Compelling, I know.