Re: Mail_IMAP 2.0.0 alpha 1
| From: | Justin Patrin | Date: | Tue, 06 Jul 2004 20:31:24 +0000 |
| Subject: | Re: Mail_IMAP 2.0.0 alpha 1 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31667@lists.php.net to get a copy of this message | ||
On Tue, 06 Jul 2004 15:42:44 -0400, Hans_L <hans@velum.net> wrote:
> Justin Patrin wrote:
> >
> > Yes, it does seem we are alone. I have seen maybe 2 messages in
> > support of Errors. Everyone else says to use Exceptions for
> > everything....even though Exceptions are *not meant for error
> > handling*!
> >
>
> What? Says who? ... that's exactly what they're designed for.
>
IMHO, they're not for general error handling, but for exceptional
circumstances, which mostly halt a program. If you want to be able to
handle errors, a return value is much more convenient and makes more
sense than a try/catch block. It makes it obvious which call had the
error and makes it obvious what code is run and what is not.
Exceptions are, in my eyes, nearly as bad as gotos. It makes code
harder to read and trace and can quite easily cause problems.
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--