Re: Re: error handling [was: ugly cvs subject]
| From: | Gabor Hojtsy | Date: | Mon, 02 Dec 2002 18:18:23 +0000 |
| Subject: | Re: Re: error handling [was: ugly cvs subject] | ||
| References: | 1 2 3 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969350111@lists.php.net to get a copy of this message | ||
> Unfortunately, we havn't answered the original concern. Is it proper to
> be dumping detailed error messages in the examples. I say yes. Showing
> the scripter how to do basic debugging until their program is working will
> help them learn faster.
>
> Of course, this does introduce the problem of scripters leaving the
> verbose error messages in their code when they're ready for production.
> Should set_error_handler()'s documentation be updated at the same time to
> reflect switching between debug and production modes? (Production mode
> being the time to supress NOTICE and perhaps WARNING errors)
Well, IMHO:
debug: print error to output
production: log error to system log / file
So I think, all errors should go through in every case, just
not to the same place ;) Actually set_error_handler() and
trigger_error() docs should be updated (generally the main error
handling page needs some update to make it more newbie friendly)...
Actually the main example on page
http://www.php.net/manual/en/ref.errorfunc.php
is far too complicated for those, who we would like to target. IMHO a more
basic example is needed (maybe above the current one, or in place of it).
Goba