Marcus Börger wrote:

Hello Sebastian,

Friday, September 5, 2003, 5:45:13 PM, you wrote:


George Schlossnagle wrote:

Forcing all thrown objects to be subclassed from Exception does not
feel  very PHP-ish.


In this case I think that right-ish should outweigh PHP-ish.


right-ish...well why not allow to throw integers and strings and....as in
other languages then?


Well, couldn't the throw mechanism check to see if the data is something other than an Exception class, and if so, create a new Exception class setting the data into it?


try {
  throw "this is my error";
} catch(Exception $e) { }

Shane

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



Reply via email to