RE: [PHP-DEV] Allow __toString() to throw exceptions

2015-05-24 Thread Thomas Punt
Hey, > I have a question: is there any reason to throw an exception from > __toString, *other* than a non-recoverable error, which would denote that > the object, which the __toString method is called on, does not have any > meaningful string representation? Because if not, core implementation ful

RE: [PHP-DEV] Allow __toString() to throw exceptions

2015-05-23 Thread Benjamin Morel
> Hi Benjamin. Hi Janub, > I have a question: is there any reason to throw an exception from __toString, > other than a non-recoverable error, which would denote that the object, which > the __toString method is called on, does not have any meaningful string > representation? Because if

Re: [PHP-DEV] Allow __toString() to throw exceptions

2015-05-23 Thread Jakub Kubíček
> > Hi, > Hi Benjamin. I have a question: is there any reason to throw an exception from __toString, *other* than a non-recoverable error, which would denote that the object, which the __toString method is called on, does not have any meaningful string representation? Because if not, core impleme

[PHP-DEV] Allow __toString() to throw exceptions

2015-05-23 Thread Benjamin Morel
Hi, There has been no feedback on this bug for a while: https://bugs.php.net/bug.php?id=53648 @aharvey said : > Should there ever be a Zend Engine 3, however, this could be revisited. Now would be the perfect time to fix it then, it would add to the list of error-handling improvements