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

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 7 09:13:57 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 hakre):

 Replying to [comment:6 scribu]:
 > I see the value in throwing exceptions, but I don't see why we couldn't
 just throw WP_Error instances.

 At the time being, WP_Error is not throw-able and to throw it is not an
 accepted practice. Not that I want to prevent you or anybody else doing
 so, infact I've suggested that in #16769 but I haven't done any test-code
 and I can not even say if that does rudimentary work or not.

 >
 > That's why I closed the other ticket.

 Ok, I can understand that now, but please keep in mind that this ticket is
 not about making WP_Error extending Exception but to just port the class
 to PHP5 for the constructor and visibility.

 For the constructor though it looks like everybody in this ticket agrees
 so far that throwing an exception in case for a incomplete instantiation
 is good.

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


More information about the wp-trac mailing list