Re: Continued try blocks

From: Date: Mon, 29 Apr 2013 16:26:47 +0000
Subject: Re: Continued try blocks
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi!

> this has quite a few issues and feels like abusing exceptions for
> regular control flow.
> The primary issue is that "throw" is a terminating operation. A

I agree. If your code can handle the problem, it should not throw. If it
throws, the control should not go back there, since the code already
gave up and declared it can not continue doing whatever it was doing.
Exceptions are meant to handle exceptional situations, not serve as a
kind of goto with objects, IMO, and if the code threw an exception, it
should be done.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227


Thread (33 messages)

« previous php.internals (#67197) next »