php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
Description:
------------
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:
---------------
<?php
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-17 17:16 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC