ID: 33407 User updated by: tomas_matousek at hotmail dot com Reported By: tomas_matousek at hotmail dot com -Status: Bogus +Status: Open Bug Type: Zend Engine 2 problem Operating System: WinXP PHP Version: 5.0.4 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [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] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] You throw in the last catch block but never catch that. ------------------------------------------------------------------------ [2005-06-20 20:55:50] tomas_matousek at hotmail dot com I don't understand your comment. If you comment out the "throw $a;" statement the exception is not thrown. So the "new" expression doesn't throw it. However, if the exception is thrown by throw $a; why the stack trace is generated during the construction. That's definitely a bug. ------------------------------------------------------------------------ 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