ID:               32101
 User updated by:  ceefour at gauldong dot net
 Reported By:      ceefour at gauldong dot net
 Status:           Verified
 Bug Type:         Zend Engine 2 problem
 Operating System: All
 PHP Version:      5.0.3
 New Comment:

This modified code may be better illustrate the problem:

<?php
function error_handler() {
        trigger_error("inside error", E_USER_ERROR);
}
set_error_handler('error_handler');
trigger_error("outside error", E_USER_ERROR);

function exception_handler($exception) {
        throw new Exception('inside exception');
}
set_exception_handler('exception_handler');
throw new Exception('outside exception');
?>


Previous Comments:
------------------------------------------------------------------------

[2005-02-25 11:01:19] [EMAIL PROTECTED]

<?php
function exception_handler($exception) {
        trigger_error("user error");
        throw new Exception('exception1');
}
set_exception_handler('exception_handler');
throw new Exception('exception2');
?>

------------------------------------------------------------------------

[2005-02-25 07:12:16] ceefour at gauldong dot net

Description:
------------
When an exception is thrown inside an exception handler, a "exception
thrown without stack frame in unknown on line 0" message is displayed.

While the meaning of this message is "clear" enough... it doesn't help
at all.

If you trigger_error() inside an error handler, the default error
handler is triggered, but still showing meaningful/helpful error
message. Exceptions inside exception handler should behave similarly.

Reproduce code:
---------------
// do this inside an exception handler function
throw new Exception('test'); 

Expected result:
----------------
...file something.php on line 483...

Actual result:
--------------
...unknown on line 0....


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32101&edit=1

Reply via email to