Changes between Version 1 and Version 2 of Ticket #28319, comment 23
- Timestamp:
- 11/23/2014 11:25:39 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28319, comment 23
v1 v2 9 9 This means that not all WP_Errors are equal. I took a stab at trying to figure that out last year (http://carlalexander.ca/diving-into-wordpress-errors/). The main conclusion was that there was no easy way to track them down without checking every hook WordPress. You'd then need data after to see which ones are relevant or not. 10 10 11 On top of that, WP_Errors are not always self contained. The most specific example is the http_api_debug hook. The WP_Error sent by the hook is not as useful without other variables passed in the hook. That means that any hook in the WP_Error object (on add or construct) isn't very useful besides for tracking a message. You lack contextual information.11 On top of that, WP_Errors are not always self contained. The most specific example is the http_api_debug hook. The WP_Error sent by the hook isn't as useful without other variables passed in the hook. That means that any hook in the WP_Error object (on add or construct) isn't very useful besides for tracking a message. You lack contextual information. 12 12 13 13 > The REST API will make pretty liberal use of WP_Error (intentionally), and logging all of those alone would be problematic.