ID: 49163
Updated by: [email protected]
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