[wp-trac] [WordPress Trac] #16769: Make WP_Error extending Exception to make it throw-able
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 9 08:51:22 UTC 2011
#16769: Make WP_Error extending Exception to make it throw-able
-------------------------+-----------------------------
Reporter: hakre | Owner:
Type: enhancement | Status: reopened
Priority: lowest | Milestone: Future Release
Component: General | Version: 3.1
Severity: normal | Resolution:
Keywords: |
-------------------------+-----------------------------
Comment (by westi):
Replying to [comment:10 filosofo]:
> Replying to [comment:8 westi]:
> > The real bug is that nothing actually checks for the WP_Error that is
returned.
>
> One of the great things about thrown exceptions is that you can reduce
the number of error checks. Currently we have an error-checking structure
roughly like this:
>
I know you can do this.
But it is a programming style that I hate.
It makes debugging and groking the error handling in a complex application
harder rather than simpler.
I don't see a strong benifit for WordPress in switching to exceptions over
handling errors correctly where they occur.
I never want a theme author to have to know what an Exception even is!
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16769#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list