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

 ID:                 32101
 Comment by:         paul at annesley dot cc
 Reported by:        ceefour at gauldong dot net
 Summary:            Exception in unknown on line 0 when throwing
                     exception inside exception handler
 Status:             No Feedback
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   *
 PHP Version:        5CVS-2005-02-15
 Block user comment: N
 Private report:     N

 New Comment:

This was fixed between PHP 5.3.5 and PHP 5.3.6 in the following
revision:



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

r307523 | stas | 2011-01-17 08:24:43 +1100 (Mon, 17 Jan 2011) | 2 lines

Fix bug #47143, bug #51458 - provide more useful info in bad exception
cases



It didn't seem to make it into the ChangeLog, though.



And it didn't reference this bug.. I guess over the past six years,
there's been a 

lot of duplicate reports!


Previous Comments:
------------------------------------------------------------------------
[2010-06-21 01:40:02] rjonbone at gmail dot com

This problem is still present as of PHP 5.3.2 on Ubuntu 10.04 using the


following test cases:



<?php

// Example 1

function exceptionHandlerFunc()

{

        throw new Exception("This message should be visible!");

}



set_exception_handler("exceptionHandlerFunc");



throw new Exception("Something bad happened");

?>

<?php

// Example 2

function shutdownFunc()

{

        throw new Exception("This message should be visible!");

}



register_shutdown_function('shutdownFunc');

?>

<?php

// Example 3

class MyClass

{

        public function __destruct()

        {

                throw new Exception("This message should be visible!");

        }

}



$test = new MyClass();

?>



All result in this error: 'Fatal error: Exception thrown without a stack
frame 

in Unknown on line 0'



While I can understand their may be complexities with stack traces, and
even 

file and line numbers in these contexts, the original error message
should at 

least be visible so that it can be debugged and resolved, i.e. Fatal
error: 

Exception (type: Exception, message: 'This message should be visible!')
thrown 

without a stack frame in Unknown on line 0.

------------------------------------------------------------------------
[2010-03-25 21:32:30] s...@php.net

Maybe related to Bug #51394

------------------------------------------------------------------------
[2007-10-30 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------
[2007-10-22 08:48:40] j...@php.net

Does this still happen using latest CVS snapshot/checkout of PHP 5.2
branch?

------------------------------------------------------------------------
[2007-10-22 08:47:25] j...@php.net

See also bug #43016



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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=32101


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

Reply via email to