php-developer-list | 2002112
Date: 11/18/02
- Next message: John Coggeshall: "RE: [PHP-DEV] error handling"
- Previous message: Rasmus Lerdorf: "Re: [PHP-DEV] Re: #20461 [Opn->Bgs]: Unable to access $PHP_AUTH_USER or $PHP_AUTH_PW"
- Next in thread: John Coggeshall: "RE: [PHP-DEV] error handling"
- Reply: John Coggeshall: "RE: [PHP-DEV] error handling"
- Reply: Rasmus Lerdorf: "Re: [PHP-DEV] error handling"
- Reply: John Bradford: "Re: [PHP-DEV] error handling"
- Maybe reply: John Coggeshall: "FW: [PHP-DEV] error handling"
- Maybe reply: Derick Rethans: "RE: [PHP-DEV] error handling"
- Maybe reply: John Coggeshall: "RE: [PHP-DEV] error handling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: John Coggeshall: "RE: [PHP-DEV] error handling"
- Previous message: Rasmus Lerdorf: "Re: [PHP-DEV] Re: #20461 [Opn->Bgs]: Unable to access $PHP_AUTH_USER or $PHP_AUTH_PW"
- Next in thread: John Coggeshall: "RE: [PHP-DEV] error handling"
- Reply: John Coggeshall: "RE: [PHP-DEV] error handling"
- Reply: Rasmus Lerdorf: "Re: [PHP-DEV] error handling"
- Reply: John Bradford: "Re: [PHP-DEV] error handling"
- Maybe reply: John Coggeshall: "FW: [PHP-DEV] error handling"
- Maybe reply: Derick Rethans: "RE: [PHP-DEV] error handling"
- Maybe reply: John Coggeshall: "RE: [PHP-DEV] error handling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

