#49163 [Csd->Bgs]: Exception Bug?
| From: | scottmac@php.net | Date: | Wed, 05 Aug 2009 04:10:05 +0000 |
| Subject: | #49163 [Csd->Bgs]: Exception Bug? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-140666@lists.php.net to get a copy of this message | ||
ID: 49163
Updated by: scottmac@php.net
Reported By: coolgk at gmail dot com
-Status: Closed
+Status: Bogus
Bug Type: *General Issues
Operating System: ubuntu5.6
PHP Version: 6SVN-2009-08-05 (SVN)
Previous Comments:
------------------------------------------------------------------------
[2009-08-05 03:55:51] coolgk at gmail dot com
found answer, exception cannot get caught in autoload
------------------------------------------------------------------------
[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