|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-12-06 07:33 UTC] mike@php.net
-Status: Open
+Status: Verified
[2016-06-15 13:45 UTC] nikic@php.net
-Status: Verified
+Status: Duplicate
[2016-06-15 13:45 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 23:00:02 2025 UTC |
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