[wp-trac] [WordPress Trac] #28319: Add hook to WP_Error for logging and report purposes
WordPress Trac
noreply at wordpress.org
Wed Jul 9 18:55:01 UTC 2014
#28319: Add hook to WP_Error for logging and report purposes
---------------------------------+--------------------------
Reporter: ebinnion | Owner: johnbillion
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.0
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: dev-feedback revert | Focuses:
---------------------------------+--------------------------
Changes (by nacin):
* keywords: dev-feedback => dev-feedback revert
Comment:
I definitely agree with kovshenin here. This should be within add(), and
we should use add() within the constructor if necessary.
I think my bigger concern here is that WP_Error objects are not exceptions
— rarely are they "exceptional." Often, they are used as return values for
functions that meet some kind of error condition, but that doesn't mean
every usage meets the level of a deprecated function, notices, or PHP
errors (see also: https://wordpress.org/plugins/log-deprecated-notices/,
https://wordpress.org/plugins/debug-bar/).
This is basically the equivalent of logging every time a function returns
false.
I'd go for a revert here and revisiting this in the future. What problem
is actually trying to be solved here? What errors are you actually trying
to track?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28319#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list