Req #45767 [Opn->Bgs]: Wording mistake: "Next exception" is "Previous exception" really
| From: | johannes@php.net | Date: | Wed, 22 Dec 2010 12:54:14 +0000 |
| Subject: | Req #45767 [Opn->Bgs]: Wording mistake: "Next exception" is "Previous exception" really | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157238@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=45767&edit=1
ID: 45767
Updated by: johannes@php.net
Reported by: david at grudl dot com
Summary: Wording mistake: "Next exception" is "Previous
exception" really
-Status: Open
+Status: Bogus
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: *
PHP Version: 5.3.0alpha1
Block user comment: N
Private report: N
New Comment:
The order is "closest first"
Previous Comments:
------------------------------------------------------------------------
[2008-08-11 16:04:36] david at grudl dot com
This is not only simple wording change, but order change.
$e is instance of HighException (!)
$e has any inner/previous exception
echo $e prints:
exception 'LowException' with message ...
blah, blah, blah
...
...
HighException prints LowException at first line - it is not expectable.
Stack traces are printed in reverse order, because it is preferable.
Exceptions should be printed in reverse order too.
------------------------------------------------------------------------
[2008-08-11 15:18:33] lstrojny@php.net
At the end it is just a wording problem. "Next exception" should be
"Previous exception" (which makes sense, than the method is called
getPrevious()). Simple wording change, accepting it.
------------------------------------------------------------------------
[2008-08-11 15:03:57] david at grudl dot com
This is not bug, of course, this is feature request.
------------------------------------------------------------------------
[2008-08-10 09:54:40] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
You're assigning an object to a variable, then overwrite the variable
with another and then echoing the variable holding the second object...
------------------------------------------------------------------------
[2008-08-10 08:39:32] david at grudl dot com
Reproduce code:
<?php
class LowException extends Exception
{
}
class HighException extends Exception
{
}
$e = new LowException("File not found.");
$e = new HighException("Missing configuration.", 0, $e);
echo $e; // $e is HighException instance
?>
Expected result:
----------------
exception 'HighException' with message 'Missing configuration.' in
test.php:13
Stack trace:
#0 {main}
Previous exception (or "Caused by") 'LowException' with message 'File
not found.' in test.php:11
Stack trace:
#0 {main}
Actual result:
---------------
exception 'LowException' with message 'File not found.' in test.php:11
Stack trace:
#0 {main}
Next exception 'HighException' with message 'Missing configuration.' in
test.php:13
Stack trace:
#0 {main}
Description:
------------
The first (and most appealing) line of textual output begins with
"exception 'LowException' with message ...", but the printed exception
is 'HighException'. This order makes output less evident.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=45767
--
Edit this bug report at http://bugs.php.net/bug.php?id=45767&edit=1