ID:               41406
 Updated by:       [EMAIL PROTECTED]
 Reported By:      andrew at alliancesoftware dot com dot au
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: Fedora Core release 4 (Stentz)
 PHP Version:      5.2.2
 New Comment:

Cannot reproduce:
first

Fatal error: Uncaught exception 'Exception' with message 'second' in
/tmp/3.php:8
Stack trace:
#0 {main}
  thrown in /tmp/3.php on line 8



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

[2007-05-16 07:23:13] andrew at alliancesoftware dot com dot au

Description:
------------
If i throw an exception in a try/catch block, and then try throwing the
same type of exception after the try/catch block has ended it will
infinitely loop through the catch block.

Reproduce code:
---------------
try {
    throw new Exception('first');
} catch (Exception $e) {
    print $e->getMessage()."\n";
}

throw new Exception('second');


Expected result:
----------------
Should just print 'first' and then exit with an uncaught Exception.

Actual result:
--------------
It prints 'first' as expected, but then goes on to infinitely loop
through the catch block again printing 'second' from the latter
exception (that is outside the catch block)


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


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

Reply via email to