MantisBT - Xdebug
View Issue Details
0000476XdebugUsage problems (Wrong Results)public2009-10-20 19:162009-11-22 14:49
0000476: Xdebug 2.0.5 does not properly work with exception chaining
Hi Derick,

I asked you a question about xdebug's support of 5.3's exception
chaining at the CodeWorks talk in LA.

Here is a quick example of what I mean:

try {
   throw new Exception('First exception');
} catch(Exception $e) {
   throw new Exception('Second exception', 0, $e);

Run this code on a web page with xdebug installed. You will notice
the first exception is completely ignored.

Call xdebug_disable() at the top of my example script above and you
will see that the standard exception message is something like:

Fatal error: Uncaught exception 'Exception' with message 'First
exception' in /home/hradtke/public/chain.php:5 Stack trace: #0 {main}
Next exception 'Exception' with message 'Second exception' in
/home/hradtke/public/chain.php:7 Stack trace: #0 {main} thrown in
/home/hradtke/public/chain.php on line 7

The documentation shows the third parameter at: [^] . Unfortunately, the
docs don't highlight that as a PHP 5.3 only change.
No tags attached.
Issue History
2009-10-20 19:16hermanradtkeNew Issue
2009-10-20 19:16hermanradtkeOperating System => CentOS
2009-10-20 19:16hermanradtkePHP Version => 5.3.0
2009-10-20 19:16hermanradtkeXdebug Version => 2.0.5
2009-11-21 17:54hermanradtkeNote Added: 0001145
2009-11-21 17:56hermanradtkeNote Edited: 0001145
2009-11-22 14:49derickNote Added: 0001149
2009-11-22 14:49derickStatusnew => closed
2009-11-22 14:49derickResolutionopen => fixed
2016-07-31 13:36derickCategoryUsage problems => Usage problems (Crashes)
2016-07-31 13:38derickCategoryUsage problems (Crashes) => Usage problems (Wrong Results)

2009-11-21 17:54   
(edited on: 2009-11-21 17:56)
Patch for this issue: [^]

2009-11-22 14:49   
I've just fixed this in CVS, but a patch that I've been working on for a bit as well. Mine also refactors the table generating and proper formatting of all errors into one table.