MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000476XdebugUsage problems (Wrong Results)public2009-10-20 19:162009-11-22 14:49
Reporterhermanradtke 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000476: Xdebug 2.0.5 does not properly work with exception chaining
DescriptionHi 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
Attached Files

- Relationships

-  Notes
(0001145)
hermanradtke (reporter)
2009-11-21 17:54
edited on: 2009-11-21 17:56

Patch for this issue:

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

(0001149)
derick (administrator)
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.

- Issue History
Date Modified Username Field Change
2009-10-20 19:16 hermanradtke New Issue
2009-10-20 19:16 hermanradtke Operating System => CentOS
2009-10-20 19:16 hermanradtke PHP Version => 5.3.0
2009-10-20 19: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 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker