note 81950 rejected from language.exceptions by betz

From: Date: Fri, 21 Mar 2008 11:05:20 +0000
Subject: note 81950 rejected from language.exceptions by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-137259@lists.php.net to get a copy of this message
Note Submitter: michael dot ochs at gmx dot net ---- Actually it isn't possible to do: <?php someFunction() OR throw new Exception(); ?> This leads to a T_THROW Syntax Error. (I think this is a bug!) But you can do the following: <?php function throwException($message = null,$code = null) { throw new Exception($message,$code); } someFunction() OR throwException(); ?>

« previous php.notes (#137259) next »