|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36773 error_handler with thrown exception
Submitted: 2006-03-17 16:08 UTC Modified: 2006-03-17 20:44 UTC
From: nikolai dot zujev at gmail dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nikolai dot zujev at gmail dot com
New email:
PHP Version: OS:


 [2006-03-17 16:08 UTC] nikolai dot zujev at gmail dot com
Could not catch exception throw from error_handler function.
I couldn't do it only in this situation, other works well.
order of errors: 
  NOTICE: Undefined variable ...
  FATAL: Class name must be a ...

Reproduce code:
error_reporting( E_ALL );
set_error_handler( 'error_handler' );

function error_handler( $errno, $errstr, $errfile, $errline )
    echo "($errno) $errstr\n";
    throw new Exception( $errstr, $errno );

class someClass { /*....*/ }

unset( $test );

$o = new $test;

Expected result:
Uncaughted exception message ... with trace.

Actual result:
non-readable core dump or smth like this.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-17 17:16 UTC]
Please try using this CVS snapshot:
For Windows:

I don't see any coredumps or any other problems.
 [2006-03-17 20:44 UTC] nikolai dot zujev at gmail dot com
Thanx, great!
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Aug 17 15:05:45 2022 UTC