#41744 [NEW]: about try...catch...
| From: | edwardhey at 163 dot com | Date: | Wed, 20 Jun 2007 00:42:30 +0000 |
| Subject: | #41744 [NEW]: about try...catch... | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-113947@lists.php.net to get a copy of this message | ||
From: edwardhey at 163 dot com
Operating system: freebsd
PHP version: 5.2.3
PHP Bug Type: Unknown/Other Function
Bug description: about try...catch...
Description:
------------
hi~!
when i use 'try' to catch the 'exception',the server throw me the
Fatal error.
php: php5.2.1/fastcgi
server: apache2.2.3
Reproduce code:
---------------
<?php
try {
$error = 'Always throw this error';
throw new Exception($error);
echo 'Never executed';
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
echo 'Hello World';
?>
Expected result:
----------------
Fatal error: Uncaught exception 'Exception' with message 'Always throw
this error' in /www/phpoo.cn/htdocs/test.php:4 Stack trace: #0 {main}
thrown in /www/phpoo.cn/htdocs/test.php on line 4
--
Edit bug report at http://bugs.php.net/?id=41744&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41744&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41744&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41744&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41744&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41744&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41744&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41744&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41744&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41744&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41744&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41744&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41744&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41744&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41744&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41744&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41744&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41744&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41744&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41744&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41744&r=mysqlcfg