Bug #60184 [Ver->Dup]: Exception stack frame text is misleading/incorrect
| From: | nikic@php.net | Date: | Wed, 15 Jun 2016 13:45:23 +0000 |
| Subject: | Bug #60184 [Ver->Dup]: Exception stack frame text is misleading/incorrect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-201652@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60184&edit=1
ID: 60184
Updated by: nikic@php.net
Reported by: ss23 at ss23 dot geek dot nz
Summary: Exception stack frame text is misleading/incorrect
-Status: Verified
+Status: Duplicate
Type: Bug
Package: *General Issues
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Marking as a duplicate of bug the newer #64910 which has a bit more discussion.
Previous Comments:
------------------------------------------------------------------------
[2011-11-01 04:04:55] ss23 at ss23 dot geek dot nz
Description:
------------
The exception stack frame is created on line 2, however, it's thrown on line 3.
Perhaps this text should be changed to "instantiated ... on line 2" instead.
As a related issue, if you had an exception factory, this would cause issues to no
end in that you cannot see the line number when the exception really was thrown,
you would only see the stack from inside the factory.
Test script:
---------------
<?php
$e = new Exception();
throw $e;
?>
Expected result:
----------------
Fatal error: Uncaught exception 'Exception' in /code/PRdMIg:2 Stack trace: #0
{main} thrown in /code/PRdMIg on line 3
OR
Fatal error: Uncaught exception 'Exception' in /code/PRdMIg:2 Stack trace: #0
{main} instantiated in /code/PRdMIg on line 2
Actual result:
--------------
Fatal error: Uncaught exception 'Exception' in /code/PRdMIg:2 Stack trace: #0
{main} thrown in /code/PRdMIg on line 2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60184&edit=1