#32101 [Opn->Ver]: Exception in unknown on line 0 when throwing exception inside exception handler

From: Date: Fri, 25 Feb 2005 10:01:20 +0000
Subject: #32101 [Opn->Ver]: Exception in unknown on line 0 when throwing exception inside exception handler
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-74539@lists.php.net to get a copy of this message
 ID:               32101
 Updated by:       tony2001@php.net
 Reported By:      ceefour at gauldong dot net
-Status:           Open
+Status:           Verified
 Bug Type:         Zend Engine 2 problem
 Operating System: All
 PHP Version:      5.0.3
 New Comment:

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


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

[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


Thread (13 messages)

« previous php.bugs (#74539) next »