Re: E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# ceo@xxxxxxxxx / 2007-01-03 14:01:29 -0600:
> On Wed, January 3, 2007 8:24 am, Roman Neuhauser wrote:
> > I don't follow the logic. What did we gain? Can one of those
> > "exceptions
> > == Java, Java stinks, exceptions stink" campers show me their version
> > of
> > the below f($any) that works in 5.1 and 5.2?
> 
> Sure.
> 
> > >     function f($any)
> > >     {
> > >         printf("%s\n", $any);
> > >     }
> 
> function print_any($any){

[34 lines of a switch ellided]

> }

Nice. Now I see how the dynamic nature of PHP boosts development. :)
 
> The problem with try/catch is that, as already noted in this thread,
> as soon as you reach a certain level of complexity and a large enough
> code-base, the whole house of cards comes tumbling down because one
> developer somewhere isn't using the same semantics for errors as you
> are.

Erm, no.  The note I made earlier in this thread said that changing
semantics of unsuspecting programs by using a throwing error handler
would be disastrous, and that was after I discussed using such a
throwing handler *for better error handling*.

> This can be as obvious as not using try/catch at all, to
> something very subtle such as what to *DO* with the errors

Same kinds of things you do with errors in a procedural program.

> or what kinds of errors to catch.

Those that you know how to handle, of course. Or was that a different
question?

> So, actually, it's not about try/catch being Java, as try/catch did
> not originate with Java, as it is about try/catch just not being
> scalable to wide-spread development.

Can you qualify that statement? What things are impossible?

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux