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
Print the invocation site for @errors in mixins and functions #474
Labels
Comments
@jmesserly do you want to give this a shot? |
thanks, yes! |
Awjin
added a commit
to sass/sass-spec
that referenced
this issue
Nov 9, 2019
See sass/dart-sass#474 [skip dart-sass]
Awjin
added a commit
that referenced
this issue
Nov 9, 2019
For any @errors encountered in mixins or functions, use the call-site (instead of the @error rule) as the span printed in the error message. Closes #474 See sass/sass-spec#1494
Awjin
added a commit
to sass/sass-spec
that referenced
this issue
Nov 12, 2019
See sass/dart-sass#474 [skip dart-sass]
Awjin
added a commit
to sass/sass-spec
that referenced
this issue
Nov 13, 2019
See sass/dart-sass#474 [skip dart-sass]
nex3
pushed a commit
to sass/sass-spec
that referenced
this issue
Nov 14, 2019
…1494) See sass/dart-sass#474 [skip dart-sass]
nex3
pushed a commit
that referenced
this issue
Nov 14, 2019
For any @errors encountered in mixins or functions, use the call-site (instead of the @error rule) as the span printed in the error message. Closes #474 See sass/sass-spec#1494
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, if an
@error
is encountered in a mixin or a function, the source span that's associated with that error (and thus the snippet that's printed in error messages) is the@error
rule itself. This isn't super useful;@error
is usually used to validate calls to an API, so if it fails it should show the call site instead.The stack trace shouldn't be affected.
For example:
Currently prints:
but it should print:
The text was updated successfully, but these errors were encountered: