Re: error handling [was: ugly cvs subject]

From: Date: Mon, 02 Dec 2002 09:18:20 +0000
Subject: Re: error handling [was: ugly cvs subject]
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969350091@lists.php.net to get a copy of this message
> IMHO, I think it's the newbies' decision on how and when to use > functionality available in PHP. I see no problem with the examples in > the documentation reflecting the use of functionality. There are > countless examples in the manual currently which don't use what could be > considered "best practice", so trying to clutter things up with > debugging logic in this case seems unreasonable (especially when there > is still so much with poor or no reasonable documentation at all). As before, I would vote for trigger_error() insted of die(), because it is "future compatible". So if the programmer introduces a new error handler in his/her program, the errors are handled centrally. I also think, that using trigger_error() instead of die() does not increase the "confusion level" of one example, while introducing some if (DEBUG == true) would increase that... If we stick to using trigger_error() in the examples, users will find it first instead of die(), and using trigger_error() is a much better practice than using die() as it goes through PHPs error handler, so it can be logged, etc. We had a discussion on this before, but never come to a real decicion... Goba

« previous php.doc (#969350091) next »