On Fri, May 10, 2013 at 12:50 AM, Etienne Kneuss wrote:
> On Fri, May 10, 2013 at 12:00 AM, Rasmus Schultz >wrote:
>
> > I just ran into this issue again:
> >
> >
> >
> http://stackoverflow.com/questions/2429642/why-its-impossible-to-throw-exception-from-tostring
> >
> > Instead of throwing some
I've heard the technical explanation before, and while it probably doesn't
make sense to go through all that effort to fix this... well... take this
example:
class Foo
{
public function __toString()
{
try {
return $this->bar();
} catch (Exception $e) {
On Fri, May 10, 2013 at 12:00 AM, Rasmus Schultz wrote:
> I just ran into this issue again:
>
>
> http://stackoverflow.com/questions/2429642/why-its-impossible-to-throw-exception-from-tostring
>
> Instead of throwing some nonsense "you're not allowed to throw from here"
> error-message, how about
I just ran into this issue again:
http://stackoverflow.com/questions/2429642/why-its-impossible-to-throw-exception-from-tostring
Instead of throwing some nonsense "you're not allowed to throw from here"
error-message, how about actually unwinding the stack and passing the
exception to the global