On 20/07/12 15:32, Alex Aulbach wrote:
Hi Ivan,
try
throw new Exception('foobar');
catch(Exception $e)
var_dump($e->getMessage());
If you use try/catch that much, that you begin to think about the
syntax, you have an architecture- or design-problem.
Not sure about that. First, it was an example. Second, it happens more
often than you think. For example, if you're writing a dispatcher (i.e.
redirect some data to some callables), you will want to catch exception
as early as possible. This is not an architecture- or design-issue, this
happens sometimes when you code.
And I would like to point that this is not the topic. The topic is
consistency in PHP syntax (restricted to control structures and
brackets/braces).
Best regards.
--
Ivan Enderlin
Developer of Hoa
http://hoa.42/ or http://hoa-project.net/
PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis)
http://disc.univ-fcomte.fr/ and http://www.inria.fr/
Member of HTML and WebApps Working Group of W3C
http://w3.org/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php