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

Call toString on invalid composes reference #578

Closed
bryanant opened this issue Apr 8, 2019 · 1 comment · Fixed by #579
Closed

Call toString on invalid composes reference #578

bryanant opened this issue Apr 8, 2019 · 1 comment · Fixed by #579

Comments

@bryanant
Copy link

bryanant commented Apr 8, 2019

Error handling on invalid references doesn't currently spit out useful data. It would be really nice to be able to see the actual problem point where a composition is found to be invalid (at the very least the line of the file that causes the issue).

@tivac
Copy link
Owner

tivac commented Apr 8, 2019

For reference, here's what the REPL shows using the error objects returned from modular-css (via postcss) directly.

CssSyntaxError: modular-css-composition: /main.css:8:15: Invalid composes reference

   6 | /* Selector composition */
   7 | .booga {
>  8 |     composes: foog;
     |               ^
   9 |     
  10 |     background: blue;

@tivac tivac closed this as completed in #579 Apr 9, 2019
tivac added a commit that referenced this issue Apr 9, 2019
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 a pull request may close this issue.

2 participants