What to Do About Errors


When an error is raised, PHP's error-handling mechanism first checks to see if a custom error handler is defined. If it is, and the error being raised is not one of the following: E_ERROR, E_COMPILE_WARNING, E_COMPILE_ERROR, E_CORE_WARNING, E_CORE_ERROR, or E_PARSE), then that error handler is invoked; otherwise, the default error handler built in to PHP is called. After the error handler returns, PHP checks to see whether the error was a fatal one. If so, the currently running script is terminated; otherwise, execution resumes at the point where the error was raised. See Figure 14.1.

Figure 14.1. Diagram of the PHP's error-handling mechanism.




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