|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-20 07:01 UTC] derick@php.net
[2007-06-20 07:20 UTC] edwardhey at 163 dot com
[2007-06-20 10:02 UTC] sniper@php.net
[2007-06-20 10:03 UTC] sniper@php.net
[2007-06-20 23:42 UTC] edwardhey at 163 dot com
[2007-06-21 21:49 UTC] johannes@php.net
[2007-06-21 22:56 UTC] judas dot iscariote at gmail dot com
[2007-06-21 23:04 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 20:00:01 2025 UTC |
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