|
Posted by John Nichel on 10/20/53 11:24
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@kegworks.com
[Back to original message]
|