HTML API: Expand Unsupported class and make it available for debugging.#6985
HTML API: Expand Unsupported class and make it available for debugging.#6985dmsnell wants to merge 5 commits intoWordPress:trunkfrom
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
The HTML Processor internally throws an exception when it reaches HTML that it knows it cannot process, but this exception is not made available to calling code. It can be useful to extract more knowledge about why it gave up, especially for debugging purposes. In this patch, more context is added to the WP_HTML_Unsupported_Exception and the last exception is made available to calling code, if it asks.
5888586 to
7999c15
Compare
48dacc2 to
5799152
Compare
| @@ -1,4 +1,4 @@ | |||
| <?php | |||
| <?php declare( strict_types=1 ); | |||
There was a problem hiding this comment.
First time I'm seeing this construct! Do we support this in Core?
There was a problem hiding this comment.
Oh not sure. Habit. We probably don't.
It is a bit confusing, because it applies type constraints to calling functions from this file, but not in external calling code which calls the functions found in this file.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
…ugging. The HTML Processor internally throws an exception when it reaches HTML that it knows it cannot process, but this exception is not made available to calling code. It can be useful to extract more knowledge about why it gave up, especially for debugging purposes. In this patch, more context is added to the WP_HTML_Unsupported_Exception and the last exception is made available to calling code through a new method, `get_unsupported_exception()`. Developed in #6985 Discussed in https://core.trac.wordpress.org/ticket/61646 Props bernhard-reiter, dmsnell, jonsurrell. See #61646. git-svn-id: https://develop.svn.wordpress.org/trunk@58714 602fd350-edb4-49c9-b593-d223f7449a82
…ugging. The HTML Processor internally throws an exception when it reaches HTML that it knows it cannot process, but this exception is not made available to calling code. It can be useful to extract more knowledge about why it gave up, especially for debugging purposes. In this patch, more context is added to the WP_HTML_Unsupported_Exception and the last exception is made available to calling code through a new method, `get_unsupported_exception()`. Developed in WordPress/wordpress-develop#6985 Discussed in https://core.trac.wordpress.org/ticket/61646 Props bernhard-reiter, dmsnell, jonsurrell. See #61646. Built from https://develop.svn.wordpress.org/trunk@58714 git-svn-id: http://core.svn.wordpress.org/trunk@58116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…ugging. The HTML Processor internally throws an exception when it reaches HTML that it knows it cannot process, but this exception is not made available to calling code. It can be useful to extract more knowledge about why it gave up, especially for debugging purposes. In this patch, more context is added to the WP_HTML_Unsupported_Exception and the last exception is made available to calling code through a new method, `get_unsupported_exception()`. Developed in WordPress/wordpress-develop#6985 Discussed in https://core.trac.wordpress.org/ticket/61646 Props bernhard-reiter, dmsnell, jonsurrell. See #61646. Built from https://develop.svn.wordpress.org/trunk@58714 git-svn-id: https://core.svn.wordpress.org/trunk@58116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…ugging. The HTML Processor internally throws an exception when it reaches HTML that it knows it cannot process, but this exception is not made available to calling code. It can be useful to extract more knowledge about why it gave up, especially for debugging purposes. In this patch, more context is added to the WP_HTML_Unsupported_Exception and the last exception is made available to calling code through a new method, `get_unsupported_exception()`. Developed in WordPress#6985 Discussed in https://core.trac.wordpress.org/ticket/61646 Props bernhard-reiter, dmsnell, jonsurrell. See #61646. git-svn-id: https://develop.svn.wordpress.org/trunk@58714 602fd350-edb4-49c9-b593-d223f7449a82
…ugging. The HTML Processor internally throws an exception when it reaches HTML that it knows it cannot process, but this exception is not made available to calling code. It can be useful to extract more knowledge about why it gave up, especially for debugging purposes. In this patch, more context is added to the WP_HTML_Unsupported_Exception and the last exception is made available to calling code through a new method, `get_unsupported_exception()`. Developed in WordPress#6985 Discussed in https://core.trac.wordpress.org/ticket/61646 Props bernhard-reiter, dmsnell, jonsurrell. See #61646. git-svn-id: https://develop.svn.wordpress.org/trunk@58714 602fd350-edb4-49c9-b593-d223f7449a82
Trac ticket: Core-61646
The HTML Processor internally throws an exception when it reaches HTML
that it knows it cannot process, but this exception is not made
available to calling code. It can be useful to extract more knowledge
about why it gave up, especially for debugging purposes.
In this patch, more context is added to the WP_HTML_Unsupported_Exception
and the last exception is made available to calling code, if it asks.