wp-cli / profile-command

Quickly identify what's slow with WordPress
MIT License
271 stars 29 forks source link

Skipping Fatal errors possible? #145

Closed wpbullet closed 6 years ago

wpbullet commented 6 years ago

I am loving wp profile, I have encountered some issues with some sites where the theme or some plugin triggers a fatal error. When this happens all I get is a fatal error and the stack trace (truncated) and no beautiful table at all.

Fatal error: Call to a member function get_value() on null in /www/game24hs_309/public/wp-content/themes/flatsome/inc/woocommerce/structure-wc-product-box.php on line 23

Is it possible to somehow suppress these warnings or make it so the table still loads? Ideally what I'd like to do is redirect these errors to a separate file for logging but still be able to see the table.

I tried redirecting STDERR to a separate file (2> /tmp/profile-errors) but it doesn't seem to make a difference

danielbachhuber commented 6 years ago

Hi @wpbullet,

GitHub issues are meant for enhancement requests and specific, reproducible bugs, not for general support questions. For support options, please review http://wp-cli.org/#support

wpbullet commented 6 years ago

My apologies @danielbachhuber I thought this would be considered an enhancement request. I wasn't sure if this was a limitation of wp profile, the libraries or something else so was hoping to get clarity here so others could find it! I'll ping on Slack sometime soon.