#33407 [Opn->Bgs]: Invalid exception stack traces
| From: | tony2001@php.net | Date: | Tue, 21 Jun 2005 19:48:37 +0000 |
| Subject: | #33407 [Opn->Bgs]: Invalid exception stack traces | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80787@lists.php.net to get a copy of this message | ||
ID: 33407
Updated by: tony2001@php.net
Reported By: tomas_matousek at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Zend Engine 2 problem
Operating System: WinXP
PHP Version: 5.0.4
New Comment:
Tomas, "throw" doesn't modify the exception, the call trace is
generated in the moment when you instantiate the object.
We didn't invent it, take a look on Java, where it behaves in the same
way.
Let's keep it this report bogus, as noone is going to change it.
Previous Comments:
------------------------------------------------------------------------
[2005-06-21 20:59:39] tomas_matousek at hotmail dot com
Do you really insist on that the stack trace should be created in the
constructor of the exception and not by the throw statement? That's
what I'm talking about.
------------------------------------------------------------------------
[2005-06-21 20:52:52] tomas_matousek at hotmail dot com
:-O
Well, you are saying that the feature is that if PHP reports
"thrown in C:\Web\$PhpTests\z.php on line 4"
than it means that the exception is created on line 4 and may be thrown
elsewhere, right?
You are introducing a new meaning for the word "thrown" then! Okay,
interesting feature.
------------------------------------------------------------------------
[2005-06-21 15:54:09] sfox@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
This is expected behaviour, as Jani said. I'm therefore marking this
report bogus.
------------------------------------------------------------------------
[2005-06-21 08:53:54] tomas_matousek at hotmail dot com
Well, that's the point of all of that! I don't want to catch it because
I want the stack trace to be shown. Alternatively, I can add try { }
catch(Exception $f) { echo $f; } and the effect would be the same - a
wrong stack trace would be printed. This has nothing to do with leaving
exception uncaught.
------------------------------------------------------------------------
[2005-06-20 22:42:27] sniper@php.net
You throw in the last catch block but never catch that.
------------------------------------------------------------------------
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/33407
--
Edit this bug report at http://bugs.php.net/?id=33407&edit=1