[wp-trac] [WordPress Trac] #28319: Add hook to WP_Error for logging and report purposes

WordPress Trac noreply at wordpress.org
Mon Nov 24 13:30:25 UTC 2014


#28319: Add hook to WP_Error for logging and report purposes
-----------------------------------+-----------------------------
 Reporter:  ebinnion               |       Owner:  johnbillion
     Type:  enhancement            |      Status:  reopened
 Priority:  normal                 |   Milestone:  Future Release
Component:  General                |     Version:  4.0
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:
-----------------------------------+-----------------------------

Comment (by carlalexander):

 > My point was more that it could be totally intentional to have multiple
 `WP_Error`s created in a single call to WP. In some of the services I
 maintain, an individual request might have 20 error objects created as-is,
 it's no different to returning `false` or `null` from a callback (except
 that you can have extra data). We don't log every time we return null.

 No, you're right. That's why I mentioned that one issue is that `WP_Error`
 doesn't carry any weight. Out of those 20 objects some could be relevant.
 That's the larger issue with the `WP_Error` class design. You need a way
 to filter the noise.

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


More information about the wp-trac mailing list