#49163 [Opn->Csd]: Exception Bug?

From: Date: Wed, 05 Aug 2009 03:55:51 +0000
Subject: #49163 [Opn->Csd]: Exception Bug?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-140664@lists.php.net to get a copy of this message
ID: 49163 User updated by: coolgk at gmail dot com Reported By: coolgk at gmail dot com -Status: Open +Status: Closed Bug Type: *General Issues Operating System: ubuntu5.6 PHP Version: 6SVN-2009-08-05 (SVN) New Comment: found answer, exception cannot get caught in autoload Previous Comments: ------------------------------------------------------------------------ [2009-08-05 02:53:37] coolgk at gmail dot com Description: ------------ the script displays a fatal error, but the exception should have stopped the script before the error happened, also the line number in error message is wrong. Reproduce code: --------------- --- From manual page: function.set-exception-handler --- function test($e){ echo $e->getMessage(); } set_exception_handler('test'); $x = new c(); function __autoload($className){ echo "Autoload"; throw new Exception(' Failed'); } Expected result: ---------------- Autoload Failed Actual result: -------------- Autoload Fatal error: Class 'c2' not found in /home/coolgk/public_html/misc/Framework/public/test3.php on line 16 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49163&edit=1

« previous php.bugs (#140664) next »