I personally have no problem with using trigger_error instead of die()... I just have an issue with not using mysql_error() because we don't want to be flooding with SQL queries, or using some sort of debugging logic in a reference manual
John >-----Original Message----- >From: Gabor Hojtsy [mailto:[EMAIL PROTECTED]] >Sent: Monday, December 02, 2002 4:18 AM >To: [EMAIL PROTECTED]; 'Philip Olson'; 'Sara Golemon' >Cc: [EMAIL PROTECTED] >Subject: Re: error handling [was: ugly cvs subject] > > >> 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 > > > -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php