Re: Error handling brainstorming
| From: | Stas Malyshev | Date: | Tue, 07 Aug 2012 05:46:27 +0000 |
| Subject: | Re: Error handling brainstorming | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-62077@lists.php.net to get a copy of this message | ||
Hi!
> circumstance. If it's not, you should be checking for existence first
> (via file_exists() or is_readable(), etc)...
This is exactly how we got into this mess with $x =
isset($a['x'])?$a['x']:null;
We're trying to get out of this mess and you're proposing to build
another mess just like that.
> errors, you can't just fread the return value. You *need* to change your
> execution flow based on that error. Therefore, it is exceptional.
That's exactly what I am saying. Exceptions should not be a means of
flow control, and that's exactly what are you doing here.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227