[wp-trac] [WordPress Trac] #16769: Make WP_Error extending Exception to make it throw-able
WordPress Trac
wp-trac at lists.automattic.com
Tue Mar 29 10:35:47 UTC 2011
#16769: Make WP_Error extending Exception to make it throw-able
-------------------------+-----------------------------
Reporter: hakre | Owner:
Type: enhancement | Status: closed
Priority: lowest | Milestone: Future Release
Component: General | Version: 3.1
Severity: normal | Resolution: fixed
Keywords: |
-------------------------+-----------------------------
Changes (by hakre):
* status: reopened => closed
* resolution: => fixed
Comment:
It's interesting to see which opinions get exchanged here but I don't
think it's possible to smash that easily the one against the other. The
[http://en.wikipedia.org/wiki/Exception_handling overall topic of Error
and Exception Handling] is far less than trivial.
So thanks for sharing your opinions and participating in this ticket.
Mine is quite simple: Switching to Exceptions for error handling in PHP
makes code more clean, easier to test, simpler and needs less code. It
enables one to write more complex applications. Debugging benefits highly
from using exceptions.
Next to that exceptions can be used to signal more than only error
exceptions.
But the question was: does it make sense for Wordpress? For those who fear
change, most certainly not, they would highly dislike to adopt.
Introducing something with no acceptance is a no-go. For those who think
that it introduces more work, the acceptance will be comparable low.
As this ticket has already seen it's active period I will close it as
fixed as my original question is answered and extensive feedback has been
given:
No, there is no actual need of an exception class that is part of
!WordPress seen.
Feel free to re-open.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16769#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list