#38639 [NEW]: Exception doesn't catch error

From: Date: Tue, 29 Aug 2006 07:20:12 +0000
Subject: #38639 [NEW]: Exception doesn't catch error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-101471@lists.php.net to get a copy of this message
From: frmi at freemail dot hu Operating system: any PHP version: 5.1.5 PHP Bug Type: *General Issues Bug description: Exception doesn't catch error Description: ------------ Replying to: Bug #31745 Yes, it is a bug, even if it is the planned behaviour. At least it does not work simply like we use exception handling in other languages. Either it is a design bug, or a documentation bug. Something MUST be wrong with this, as there is no clear doc/tutorial/example that shows how to handle database or file handling or other exceptions. At least documentation should clearly state that exception handling can only be used to handle exceptions what you thow and not for exceptions thrown by functions. Or better it should mention the trick (which I could not find anywhere) that exception can be thrown from error_handler (and give a simple example for that), and so it works similar to other languages. Reproduce code: --------------- try //or other keyword --code.... catch or exception or other keyword --code end; Expected result: ---------------- Should not give back php default error in case of any error. -- Edit bug report at http://bugs.php.net/?id=38639&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38639&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38639&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38639&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38639&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38639&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38639&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38639&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38639&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38639&r=support Expected behavior: http://bugs.php.net/fix.php?id=38639&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38639&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38639&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38639&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38639&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38639&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38639&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38639&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38639&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38639&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38639&r=mysqlcfg

« previous php.bugs (#101471) next »