Re: Continued try blocks

From: Date: Tue, 30 Apr 2013 17:57:40 +0000
Subject: Re: Continued try blocks
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
hi,

On Tue, Apr 30, 2013 at 7:54 PM, Stas Malyshev <[email protected]> wrote:

>> You may have a lib/object/chunk of code which raises exceptions, because
>> its developer thought some error is not recoverable; but when you use
>> it, you don't want to break your program's execution.
>
> That's why you have try/catch.

Exactly, I cannot agree more here.

This proposal brings yet again exceptions for control flow, which is
really not what they are designed for (no matter the language, or
almost all languages). An exception can be handled and the program can
continue? Catch it, any other tricks bring control flow using
exception and that's really a bad idea.

Cheers,
--
Pierre

@pierrejoye | http://www.libgd.org


Thread (33 messages)

« previous php.internals (#67221) next »