Req #52155 [Com]: Change fatal_error to fatal_error_exception
| From: | olamedia at gmail dot com | Date: | Thu, 24 Jun 2010 05:32:09 +0000 |
| Subject: | Req #52155 [Com]: Change fatal_error to fatal_error_exception | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151824@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52155&edit=1
ID: 52155
Comment by: olamedia at gmail dot com
Reported by: olamedia at gmail dot com
Summary: Change fatal_error to fatal_error_exception
Status: Open
Type: Feature/Change Request
Package: Scripting Engine problem
PHP Version: 5.3.2
New Comment:
Which types of "fatal errors" we can replace with throw exception (and
write to
log/mail to/show custom html):
1. out of memory - cleanup $GLOBALS and calling GC before (to free up
memory)
2. compile error - when trying to include, require or eval
3. call to undefined function - that's simpler as above, like use of
undefined
variable
Previous Comments:
------------------------------------------------------------------------
[2010-06-23 11:10:14] olamedia at gmail dot com
Description:
------------
It is almost impossible now to handle fatal errors.
Of course there are exists some ways (shutdown handler or ob_start):
http://eirikhoem.wordpress.com/2008/03/15/dying-with-grace-phps-
register_shutdown_function/
I think, that replacing message "Fatal error" with something like
"FatalErrorException" is possible and follows use case of exceptions.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52155&edit=1