[wp-trac] [WordPress Trac] #46620: WSoD Protection: Pass the error through to error template and associated filters

WordPress Trac noreply at wordpress.org
Sat Mar 23 14:29:55 UTC 2019


#46620: WSoD Protection: Pass the error through to error template and associated
filters
-------------------------+-------------------------
 Reporter:  johnbillion  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  5.2
Component:  Plugins      |    Version:  trunk
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:               |
-------------------------+-------------------------
 This change passes the error data through the error template handler, so
 it's exposed to the custom error handler if present, and through the
 default error template handler, so it's exposed to the default error
 message filters and the ultimate `WP_Error` object that's passed to
 `wp_die()`.

 This has a few benefits:

 * The custom error handler and default error message filters can inspect
 the error and perform logic based on its properties.
 * Custom `wp_die()` handlers can alter their behaviour depending on a
 combination of the error itself and the WP_Error code. For example, WP-CLI
 could more gracefully handle this error in its output by including details
 of the error itself and information about enabling recovery mode or using
 WP-CLI's own `--skip-plugins` flag.

 Taken from https://github.com/wp-core-php/wordpress-develop/pull/7

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46620>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list