Re: Bug #64910: Line number of $e = new Exception vs. line number of throw $e

From: Date: Thu, 23 May 2013 23:37:50 +0000
Subject: Re: Bug #64910: Line number of $e = new Exception vs. line number of throw $e
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-67469@lists.php.net to get a copy of this message
> On one hand, I think it makes sense - nobody really cares where the > exception was created... But there's one problem here: > > try { >     //stuff > } catch(Exception $e) { >     $logger->log("Oops, exception!"); >     throw $e; > } > > If we update file/line here, we lose original exception information and > file/line in the exception becomes useless. Right now, since 99.99% of > the code does "throw new", it is always useful. So how you would > propose > to solve this? rethrow $e;

« previous php.internals (#67469) next »