Re: Re: poll: howto do informative error handling without the fatalities

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

 



On Tue, 2010-02-09 at 07:22 +0100, Rene Veerman wrote:
> I would also like to hear suggestions on how to fix this mess:
> 
> $r = funcA ( funcB ( funcC ( $p ) ) );
> 
> if funcB() / funcC() fails, how would you fudge/abort the calling
> function in the chain?
> One may think that funcA and funcB just check their parameters list
> for being "error" arrays, but the problem i foresee is that depending
> on the context of the $r= call, desired behaviour may vary at any
> stage in the funcA -> funcB -> funcC chain.
> 
I would abort it by embedding the mess in a try.. catch statement, then
throwing an exception. Teus.

-- 
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