Date: 12/02/02
- Next message: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- Previous message: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- In reply to: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- Next in thread: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- Reply: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> > +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 :)
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...
Goba
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- Previous message: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- In reply to: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- Next in thread: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- Reply: Derick Rethans: "Re: [PHP-DOC] Re: error handling [was: ugly cvs subject]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

