Re: Catching all errors and redirecting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Hochstetter wrote:
Hi again,

Is it possible to catch all parser errors (notices), and as that happens
redirecting to a 'sorry-page-not-available-at-this-moment' page, whilst
storing the error (or notice) message somewhere else (e.g. emailing it to
the developer).

Parse errors, no. When the script won't parse, it can't run, so there's no way to capture the error with php. Other errors (mysql, can't open file, etc). Yes. Most functions will return something upon execution (the result you want on success, false/null on failure). Capture that. Notices? Turn that off in the php.ini for production. You can also have php log the errors.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux