[2013年05月23日 16:07 UTC] sebastian@php.net
Description: ------------ The error message that is created for an uncaught exception as well as the stacktrace of an exception list the number of the line on which the exception object was created. I would expect this to be number of the line on which the exception is raised using the throw statement. Also note that the documentation on this is inconsistent: the Exception::getLine() method is documented with "Gets the line in which the exception occurred" whereas the Exception::$line attribute is documented with "The line where the exception was created". Test script: --------------- <?php $e = new Exception; throw $e; Expected result: ---------------- Fatal error: Uncaught exception 'Exception' in /home/sb/test.php:3 Stack trace: #0 {main} thrown in /home/sb/test.php on line 3 Actual result: -------------- Fatal error: Uncaught exception 'Exception' in /home/sb/test.php:2 Stack trace: #0 {main} thrown in /home/sb/test.php on line 2 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013年05月23日 17:20 UTC] derick@php.net
[2013年05月23日 20:34 UTC] stas@php.net
[2013年05月23日 21:33 UTC] theseer@php.net
|