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

Add Specific Error Message For Invalid Browser String #492

Closed
bdkjones opened this issue Aug 4, 2015 · 3 comments
Closed

Add Specific Error Message For Invalid Browser String #492

bdkjones opened this issue Aug 4, 2015 · 3 comments
Labels
Milestone

Comments

@bdkjones
Copy link

bdkjones commented Aug 4, 2015

Currently, if you supply an invalid browser string to Autoprefixer, the tool fails with the message: internal error.

This is not helpful at all. Several of my customers have wasted quite a lot of time trying to figure out why Autoprefixer won't run, only to discover that they made a typo in the browser string parameter.

It would be very useful to provide a descriptive error message in this case. Something like: "Autoprefixer failed to run because the supplied browser string parameter is not valid: [browser string parameter]"

@bdkjones
Copy link
Author

bdkjones commented Aug 4, 2015

What would be really cool is to add a function to the CLI that lets you pass a proposed browser string to Autoprefixer and have the tool return whether or not that string is valid. This would let me validate browser strings as soon as the user enters them rather than waiting until AP runs and fails.

@ai
Copy link
Member

ai commented Aug 4, 2015

Autoprefixer had good error name before, but seems like I miss a code, when I splited Autoprefixer and Browserslist.

@ai
Copy link
Member

ai commented Aug 31, 2015

Should be fixed in autoprefixer-cli https://github.com/ai/autoprefixer-cli/blob/master/test/binary.js#L392-L394

@ai ai closed this as completed Aug 31, 2015
@ai ai modified the milestone: 6.0 Jan 14, 2016
@ai ai removed the 6.0 label Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants