Re: Continued try blocks

From: Date: Tue, 30 Apr 2013 13:59:25 +0000
Subject: Re: Continued try blocks
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-67216@lists.php.net to get a copy of this message
2013/4/29 Stas Malyshev <smalyshev@sugarcrm.com> > 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. > It's a point of view, not something the language should enforce. 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. It happens.

« previous php.internals (#67216) next »