And that's about it from me. In this two-part article, you learned how to use PHP's error-handling API to exert fine-grained control over the way the language handles errors. You learned how to control the display of specific error types, how to customize the manner in which they're handled, and how to raise errors of your own. Next, you learnt how to log errors, write them to a file and email them out to all and sundry. And, as if all that wasn't enough, the final section of this article demonstrated the process of creating a robust, scalable error-handling system for a Web application. In case you'd like to know more about the material discussed in this article, consider checking out the following links: A description of PHP error types, at http://www.php.net/manual/en/phpdevel-errors.php Gyozo Papp's ErrorHandler class, at http://www.phpclasses.org/browse.html/package/345 PHP output buffering, at http://www.php.net/manual/en/ref.outcontrol.php PHP's MySQL functions, at http://www.php.net/manual/en/ref.mysql.php PHP's file handling functions, at http://www.php.net/manual/en/ref.filesystem.php I hope you enjoyed this article, and that you found it interesting and informative. Till next time...be good! Note: All examples in this article have been tested on Linux/i586 with Apache 1.3.20 and PHP 4.1.1. Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article. YMMV!
blog comments powered by Disqus |