>
>Regarding the confusion factor this is a valid point.  The 
>error handling docs should clearly describe how the error 
>directives such as display_errors, error_reporting, and 
>log_errors behave and why a blank page my result. And describe 
>ideal production vs. development scenerios.

We're getting off track here.. The issue is if we should be using
Trigger_error() in the PHPDocs or use die(), or use nothing...
Personally, I don't care which of the two we use -- but I am -1
At the idea of doing nothing in terms of error handling.

As far as error handling documentation goes, there are plenty of
Online resources available to the developer. For the e-mail function
We have placed links to outside resources where better information
Can be found for sending MIME e-mails (since they aren't supported
Interally by PHP)... What's wrong with something like that? I know
There are plenty of good tutorials out there that explain and deal
With the concept of good error handling practices.

John



>The worst case scenerio is people will ask what 
>trigger_error() does in which case RTFM will work, hence the 
>doc update.  I strongly feel this change will greatly benefit 
>the PHP community at large.
>
>Regards,
>Philip
>
>
>
>On Mon, 2 Dec 2002, Derick Rethans wrote:
>
>> On Mon, 2 Dec 2002, Gabor Hojtsy wrote:
>> 
>> > > > +1 on using trigger_error() in examples, including in 
>> > > > +mysql_connect. In
>> > my
>> > > > experience, it needs more exposure to newbies as it is a far 
>> > > > more
>> > efficient
>> > > > way of dealing with errors. (And it actually took me a couple 
>> > > > years to discover it! :)
>> > >
>> > > I'm -1 on this; don't over complicate examples with 
>> > > trigger_error(). Example for functions should be short and the 
>> > > main topic should be the function, not trigger_error().
>> > 
>> > So you think, that die() does not complicate the example, while
>> > trigger_error() does? It's just a functions with a longer name :)
>> 
>> die("foo");
>> 
>> vs.
>> 
>> trigger_error("foo", E_USER_ERROR);
>> 
>> is IMO a complication.
>> 
>> > We have two aspects we need to consider:
>> > 
>> >  1. Encourage safe coding
>> >  2. Provide short and easy to understand examples
>> > 
>> > If we leave errors unhandled in examples, that is simple, 
>but harms 
>> > the developers. I do think, that using too much error 
>handling code 
>> > in examples hurts, but none is not better...
>> 
>> right, die() works fine for that.
>> 
>> Derick
>> 
>> --
>> 
>> 
>---------------------------------------------------------------
>----------
>>  Derick Rethans                                 
>http://derickrethans.nl/ 
>>  PHP Magazine - PHP Magazine for 
>Professionals       http://php-mag.net/
>> 
>----------------------------------------------------------------------
>> ---
>> 
>> 
>> --
>> PHP Documentation Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>
>


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to