Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP_Error tracker #559

Closed
wants to merge 6 commits into from
Closed

WP_Error tracker #559

wants to merge 6 commits into from

Conversation

johnbillion
Copy link
Owner

@johnbillion johnbillion commented Nov 13, 2020

This introduces a new panel which allows you to track the journey that a WP_Error object takes through the code.

Requires WordPress 5.6 (see https://core.trac.wordpress.org/ticket/40568).

The instantiation of the error is tracked (specifically, the addition of an error to a WP_Error object is tracked) and then any subsequent calls to is_wp_error() where that error object is passed through it.

I'm unsure if this panel is widely useful, but I have found it to be useful if a WP_Error instance "disappears" by, for example, being checked and then turned into return false. This panel allows for part of that investigation to be provided for you as you can see the journey that the error took until it disappeared.

This usage pattern of course shouldn't be encouraged, but it's what we have. Use exceptions!

The filtered stack trace is currently quite unreliable. I need to continue working on improvements to the filtering inside QM_Backtrace.

wp-errors

@johnbillion johnbillion mentioned this pull request Nov 13, 2020
29 tasks
@johnbillion johnbillion mentioned this pull request May 13, 2021
14 tasks
@johnbillion johnbillion closed this Sep 8, 2022
@johnbillion johnbillion deleted the feature/wp-error-tracker branch November 10, 2022 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant