I think in a modern web application the error handling function should do
the following:
in case of error (any: parse error, internal application error,....)

1. a message should be shown to the user sayng that an error has occured
like "an internal error has occured. the webmaster has been notified via
email"
2. a more detailed message should be logged in a generic system ErrorLog, or
notified via email or fax, or telephone, or SMS. Depending on the severity
of the error (warning, fatal,...)

All this done with PHP error handling function (this is not to male
distinction between PHP error and application internal error), and the
ErrorLog kept via system/server methods (like syslogd). The message shown to
the user should be accompained by an HTTP 500 (or more) error. This to make
clear to human users that an error has occured therefore the request cannot
be fulfilled, and if the cliens is another computer (robot,...) to make it
as well (computer look at error codes rather than at things written for
humans.

I know this is possible now, but not within the error handling function of
PHP, or without setting a custom error handler.

Mattia Cazzola



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to