#50446 [NEW]: Missing documentation or bug for SET_EXCEPTION_HANDLER()

From: Date: Fri, 11 Dec 2009 02:44:49 +0000
Subject: #50446 [NEW]: Missing documentation or bug for SET_EXCEPTION_HANDLER()
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-3439@lists.php.net to get a copy of this message
From: randallgirard at hotmail dot com Operating system: Windows PHP version: 5.3.1 PHP Bug Type: Documentation problem Bug description: Missing documentation or bug for SET_EXCEPTION_HANDLER() Description: ------------ The documentation does not state for the function set_exception_handler(...) that it will terminate processing. I do not see much of a reason for such a handler if you do not have this option. Unless I am missing something, please include such documentation or fix this in the next release. Take for example set_error_handler() which forces you to handle termination of the script (when necessary) from code. NOTE: I am using v5.3.0 on my local machine for testing, and havent tested on my server which runs 5.3.1 but I doubt this is the case. Reproduce code: --------------- function exception_handler($exception) { echo "Uncaught exception: " , $exception->getMessage(), "\n"; } set_exception_handler('exception_handler'); function errorone() { throw new Exception("Test 1"); } function errortwo() { throw new Exception("Test 2"); } function test() { errorone(); errortwo(); } test(); test(); # I also did further tests involving class scopes that I thought might affect this, but I'm almost positive processing of the script is terminated without a way to restore it. Expected result: ---------------- Uncaught exception: Test 1\nUncaught exception: Test 2\nUncaught exception: Test 1\nUncaught exception: Test 2\n Actual result: -------------- Uncaught exception: Test 1\n -- Edit bug report at http://bugs.php.net/?id=50446&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50446&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50446&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50446&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50446&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50446&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50446&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50446&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50446&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50446&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50446&r=support Expected behavior: http://bugs.php.net/fix.php?id=50446&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50446&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50446&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50446&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50446&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50446&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50446&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50446&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50446&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50446&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50446&r=mysqlcfg

« previous php.doc.bugs (#3439) next »