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

Provide more debug-friendly error messages #24

Open
artfulrobot opened this issue Jul 4, 2016 · 1 comment
Open

Provide more debug-friendly error messages #24

artfulrobot opened this issue Jul 4, 2016 · 1 comment

Comments

@artfulrobot
Copy link

I removed a colour from the definition (or I misspelled a colour name) and I get this error:

Message:
    node_modules/chroma-sass/sass/chroma/_functions.scss
Error: The color "watermark" was not found.
        on line 170 of node_modules/chroma-sass/sass/chroma/_functions.scss
>>     @error 'The #{$_chroma-spelling} "#{$name}" was not found.';
   ----^

This does not tell me where the error was encountered - except some internal reference to the chroma code.

It would be nice if it said

"line 1234 of sass/components/yourfile.scss references colour 'watermark' but this is not defined."

or such.

@JohnAlbin
Copy link
Owner

I agree, but I have no idea how to accomplish this. Sass adds the line number and file name to where the Chroma code calls @error, but, afaik, Chroma doesn't have access to the line number and file name of the calling code.

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

No branches or pull requests

2 participants