[wp-trac] [WordPress Trac] #44458: Catch WSODs and provide a means for recovery for end users
WordPress Trac
noreply at wordpress.org
Fri Jul 27 15:25:19 UTC 2018
#44458: Catch WSODs and provide a means for recovery for end users
-------------------------------------------------+-------------------------
Reporter: schlessera | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.0
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests needs- | Focuses: multisite
testing |
-------------------------------------------------+-------------------------
Comment (by schlessera):
I made a more thorough examination of the potential errors we can catch:
https://www.notion.so/brightnucleus/WP-Sandbox-
88738b62e9e947a7aeb8271d958a5497
As a conclusion, here's what I think we should try to catch:
{{{
E_ERROR => register_shutdown_function()
E_PARSE => register_shutdown_function()
E_RECOVERABLE_ERROR => set_error_handler() (turn into E_ERROR ?)
Exception => try/catch
Error => try/catch (PHP7+)
}}}
The error handler for `E_RECOVERABLE_ERROR` and the `try/catch` block for
the exceptions can just turn them into an `E_ERROR` so that the shutdown
handler can take over. This allows us to guide everything through one
singular funnel.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44458#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list