Hi!

> but sometimes you want to be more precise. With exceptions, we have an
> elegant way to manage all failures as a whole, or to differenciate each
> reason.

You do not, unless you have 20 exception types and catch them all
separately. Which nobody would ever do for one simple reason - what if
you miss one? What if next version adds one and you didn't update your
code? In practice what happens is people just write try { ...}
catch(Exception e) {} and that's it.

> "protected call" function [1]. A convenient mean to say «OK, I know this
> expression may raise an exception, but I don't care, discard it silently
> please. I will check if my variable has been set or not.».
> 
> [1] : http://www.lua.org/pil/8.4.html

Which, coincidentally, is exactly like PHP works. I see no reason to
rewrite all the functions just to add the functions that allow you to go
back.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to