Re: Bug #64910: Line number of $e = new Exception vs. line number of throw $e
| From: | Josh Davis | Date: | Fri, 24 May 2013 02:36:06 +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-67476@lists.php.net to get a copy of this message | ||
On 23 May 2013 22:22, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
> 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?
As a PHP programmer, I would always expect the file/line to refer to
the throw statement that has thrown it last. If I wanted to keep track
of an exception being rethrown, I'd use nested exceptions (Exception's
constructor's third parameter.)
Hope that helps.