Req #52155 [Opn->Fbk]: Change fatal_error to fatal_error_exception
| From: | danack@php.net | Date: | Fri, 15 Jan 2016 14:03:11 +0000 |
| Subject: | Req #52155 [Opn->Fbk]: Change fatal_error to fatal_error_exception | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198682@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=52155&edit=1
ID: 52155
Updated by: danack@php.net
Reported by: olamedia at gmail dot com
Summary: Change fatal_error to fatal_error_exception
-Status: Open
+Status: Feedback
Type: Feature/Change Request
Package: Scripting Engine problem
PHP Version: 5.3.2
Block user comment: N
Private report: N
New Comment:
Most of the internal engine errors that previously gave fatal errors have been changed to use
exceptions - https://wiki.php.net/rfc/engine_exceptions_for_php7
Please report any remaining problems individually.
Previous Comments:
------------------------------------------------------------------------
[2011-05-06 03:13:03] olamedia at gmail dot com
There are about 5-10 similar bugs:
http://bugs.php.net/search.php?cmd=display&search_for=fatal&x=0&y=0
Handling fatal errors is important. Another option is to use external debugger,
which in some cases takes a longer time (to setup copy of website locally or to
setup connection - we not always have ssh and not always allowed to setup own
software on shared server) than inserting exit at each script to find the place
with loop.
------------------------------------------------------------------------
[2010-09-24 20:40:25] boxen1com at gmail dot com
Maybe a wordpress update will help you, because wordpress have thousands bugs....
We had also this bug on http//www.boxen1.com, since a wordpress update, the
wordpress works fine,
------------------------------------------------------------------------
[2010-06-24 07:32:08] olamedia at gmail dot com
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
------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=52155&edit=1