[wp-trac] [WordPress Trac] #59282: WordPress should register custom error and exception handlers

WordPress Trac noreply at wordpress.org
Tue Sep 5 12:51:50 UTC 2023


#59282: WordPress should register custom error and exception handlers
-----------------------------+------------------------------
 Reporter:  bjorsch          |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Bootstrap/Load   |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+------------------------------

Comment (by bjorsch):

 > how external exception/error handlers can "handoff" errors

 What they should do is store the return value from their own
 `set_error_handler()` or `set_exception_handler()` call, and tail-call to
 that if there is one where they'd otherwise return false.

 > and the somewhat uneasy feeling as we overload the INI values.

 `display_errors` is the only one being "overloaded", the rest are just
 being used in the same way PHP itself uses them.

 I'm not entirely happy with the way `display_errors` is being used either,
 but I can't think of a better idea. We need to turn it off before
 returning false to call PHP's default handler, and we need to be able to
 differentiate our own turning-off from someone else's.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59282#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list