[wp-trac] [WordPress Trac] #57842: Add a new independent WP_Exception class, compatible with WP_Error
WordPress Trac
noreply at wordpress.org
Tue Aug 5 18:56:26 UTC 2025
#57842: Add a new independent WP_Exception class, compatible with WP_Error
-------------------------+------------------------------
Reporter: junaidbhura | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------------------
Comment (by johnbillion):
Replying to [comment:8 dmsnell]:
> - Did you consider adjusting `WP_Error` to extend `Exception` itself
rather than creating a new `WP_Exception`? What would it look like in
comparison if we could simply return or throw a `WP_Error`?
I had this thought too, unfortunately the constructor isn't compatible
with `Throwable`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57842#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list