View Issue Details

IDProjectCategoryView StatusLast Update
0000476XdebugUncategorizedpublic2009-11-22 14:49
Reporterhermanradtke Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0000476: Xdebug 2.0.5 does not properly work with exception chaining
Description

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:

<?php
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:
http://www.php.net/manual/en/class.exception.php . Unfortunately, the
docs don't highlight that as a PHP 5.3 only change.

TagsNo tags attached.
Operating SystemCentOS
PHP Version5.3.0

Activities

hermanradtke

2009-11-21 17:54

reporter   ~0001145

Last edited: 2009-11-21 17:56

Patch for this issue:

http://www.hermanradtke.com/patches/xdebug-476-exception_chaining.patch

derick

2009-11-22 14:49

administrator   ~0001149

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.

Issue History

Date Modified Username Field Change
2009-10-20 18:16 hermanradtke New Issue
2009-10-20 18:16 hermanradtke Operating System => CentOS
2009-10-20 18:16 hermanradtke PHP Version => 5.3.0
2009-10-20 18:16 hermanradtke Xdebug Version => 2.0.5
2009-11-21 17:54 hermanradtke Note Added: 0001145
2009-11-21 17:56 hermanradtke Note Edited: 0001145
2009-11-22 14:49 derick Note Added: 0001149
2009-11-22 14:49 derick Status new => closed
2009-11-22 14:49 derick Resolution open => fixed
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized