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
Display warning if non existent parameters are passed in --checks
and --categories
#348
Comments
This issue is similar to #360 . Would it be of worth implementing the validation here for |
I suppose we can catch any exceptions and turn them into proper error messages (not warnings) |
@swissspidy Please check #383 |
I was thinking more like something like this in the command class: try {
....
} catch ( Exception $error ) {
WP_CLI::error( $error->getMessage() );
} We already do this in some places |
This fatal error comes before execution reaches to CLI command class. Even when |
Proper warning message should be displayed rather than fatal error when non existent check is passed to
--checks
wp plugin check hello-universe --checks=nonexistent_check
Currently it generates PHP fatal error.
May be we should display warning message like
WARNING: Invalid check slug 'nonexistent_check'
We could implement similar for categories also.
wp plugin check hello-universe --categories=nonexistent_category
The text was updated successfully, but these errors were encountered: