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