[wp-trac] [WordPress Trac] #16782: PHP5-Port - WP_Error Class

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 7 02:22:56 UTC 2011


#16782: PHP5-Port - WP_Error Class
------------------------------------+------------------------------
 Reporter:  hakre                   |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  General                 |     Version:  3.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by filosofo):

 I think there are at least two possible benefits to using exceptions in
 WP:
  * It would allow us to handle error conditions in fewer places, which
 means more consistent error handling.
  * It's probably much faster to catch exceptions at a few points than to
 do the many `is_wp_error` checks we do now, because we could write code
 that assumes a certain type of return value and let PHP handle the branch
 in logic when the exception is thrown instead.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16782#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list