Home arrow PHP arrow Error Handling In PHP (part 2)

Error Handling In PHP (part 2)

The first part of this article demonstrated basic errorhandling in PHP, explaining the various error types and illustrating theprocess of building a custom error handler. But that's just the tip ofthe iceberg - this concluding part goes a step further, showing you totrigger your own errors, and log error messages to a file, database oremail address.

TABLE OF CONTENTS:
  1. Error Handling In PHP (part 2)
  2. Raising Hell
  3. Rolling Back
  4. Turning Up The Heat
  5. Of Form And Function
  6. Buffer Zone
  7. Back To Class
  8. Endgame
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 11
April 09, 2002

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
In the first part of this article, I introduced you to PHP's error-handling functions, demonstrating how they could be used to control the manner in which errors are handled. I showed you how to use the error reporting functions to filter out those error types you didn't want to see, and how to use a custom error handler to catch PHP's notices and warnings. Finally, I wrapped things up with a demonstration of how a custom error handler could be used to track errors on a Web site, and write those errors to a log file for later review.

There's a lot more you can do with PHP's error-handling API, though; what you've seen so far is just the tip of the iceberg. In this concluding section, I will demonstrate how you can piggyback your code on top of PHP's core engine by triggering your own errors and writing custom handlers to deal with them. I will also show you a simpler method of logging errors, and will (as usual) put the theory to the test with a couple of real-world examples. Much mayhem ahead...so don't go anywhere!

 
 
>>> More PHP Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: