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

Reply via email to