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

WordPress Trac noreply at wordpress.org
Thu Jun 26 22:12:56 UTC 2025


#59282: WordPress should register custom error and exception handlers
-------------------------------------------------+-------------------------
 Reporter:  bjorsch                              |       Owner:  (none)
     Type:  feature request                      |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Bootstrap/Load                       |     Version:  6.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-test-   |     Focuses:
  info                                           |
-------------------------------------------------+-------------------------

Comment (by SirLouen):

 Replying to [comment:14 jorbin]:
 > There are currently over
 [https://wpdirectory.net/search/01JYPSRVVEEYCZMTGQJECEFKVA 900 plugins
 that add an exception handler] and
 [https://wpdirectory.net/search/01JYPSWMKB3QZESDJ43RX92VR1 3453 that add
 an error handler]. A fairly large percentage of them don't implement
 calling a previusly registered handler. This means that there are going to
 be millions of sites that never can take advantage of this functionality.
 I worry this is going it is thus going to be hard for extenders to count
 on and the existing expectation to escape exceptions/errors is the safest.

 Your concern makes all sense, but I think it doesn't fully justify the
 fact that the core itself could benefit from this and anyone who is not
 doing an intensive use of such plugins. Moreover, some plugins over time
 could evolve to adapt error handling aligned with WP standards. Also,
 maybe this could be at some point part of [https://wordpress.org/plugins
 /plugin-check/ PCP]

 We cannot turn the head to the fact that there is space for improvement,
 and despite there could be an adoption barrier by extenders, it's
 something preferable long-term

 Anyway, I think I need to see in practice some real code example
 collisions and some test info in general for the proposed idea (apart from
 a bunch of text bullet points). It can take a while to research for this
 info for a tester, while, in theory, the reporter/patch maker should have
 this info available if he has been working on this topic. These
 theoretical proposals of code are a bit hard to digest, ngl. @bjorsch this
 report has had a `needs-test-info` status for more than a year, so now I
 don't wonder why this has been stuck for a good while. First, someone
 should have satisfied this for progress.

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


More information about the wp-trac mailing list