Chapter14.Error Handling


Chapter 14. Error Handling

IN THIS CHAPTER

  • The PHP Error-Handling Model

  • What to Do About Errors

  • The Default Error Handler

  • Error Suppression

  • Custom Error Handlers

  • Causing Errors

  • Putting It All Together

Even the most well-written script will occasionally encounter less than ideal circumstances. A database or ldap server may have crashed, a local file lock may have become stuck, or maybe that newly hired administrator got overzealous tightening down security and now your script can't access the data that it needs. Whatever the reason, errors do occur, and although PHP can recognize them, it's up to your script to decide what actions need to be taken so that your site functions as smoothly as possible and your users are encouraged to come back when the problem has been resolved.



PHP 5 Unleashed
PHP 5 Unleashed
ISBN: 067232511X
EAN: 2147483647
Year: 2004
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net