php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49163 Exception Bug?
Submitted: 2009-08-05 02:53 UTC Modified: 2009-08-05 04:10 UTC
From: coolgk at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 6SVN-2009-08-05 (SVN) OS: ubuntu5.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: coolgk at gmail dot com
New email:
PHP Version: OS:

 

 [2009-08-05 02:53 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-05 03:55 UTC] coolgk at gmail dot com
found answer, exception cannot get caught in autoload
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Nov 28 06:00:01 2025 UTC