Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Sourcemaps not applied on processor errors #155

Closed
emilgoldsmith opened this issue Dec 12, 2017 · 1 comment
Closed

Sourcemaps not applied on processor errors #155

emilgoldsmith opened this issue Dec 12, 2017 · 1 comment

Comments

@emilgoldsmith
Copy link
Member

Sourcemaps don't get applied on errors that our processor throws, it's possible that the fix is as easy as us applying source maps to the lines we put in the constructor of the error, as then we can just let Stylelint handle terminating early etc. as errors from our side also mean that the stylelint call wouldn't be able to finish anyway.

I would do it in the way where we make a wrapper ourselves around the CssError we're currently using that applies the sourcemaps, or in some other way have it modularized / automated.

Now that we're talking about errors, I also think that we should be throwing an error here:


as it means our processor crashed. We can still call it a CssSyntaxError, but just put in a message that our processor crashed and maybe include the original error message.

@chinesedfan
Copy link
Member

If an CssSyntaxError was thrown, it means failed to parse the input file. The line number already points to the original file, which doesn't need to be converted.

And all errors are handled by #211.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants