|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-25 17:03 UTC] auroraeosrose at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 03:00:01 2025 UTC |
Description: ------------ this is the 5.0 cvs snapshots NOT the 5.1 cvs snapshots set_exception_handler(array($object, 'method')); or even set_exception_handler(array('Class', 'method')); does not work, setting just a function does set_exception_handler('function); Reproduce code: --------------- class dog { function bug($exception) { var_dump($exception); } } $dog = new dog(); set_exception_handler(array($dog, 'bug')); throw new Exception('doggy'); Expected result: ---------------- Fatal error: Uncaught exception 'Exception' with message 'doggy' in [removed]:10 Stack trace: #0 {main} thrown in [removed] on line 10 Actual result: -------------- object(Exception)#1 (6) { ["message:protected"]=> string(5) "doggy" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(45) "[removed]" ["line:protected"]=> int(8) ["trace:private"]=> array(0) { } }