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

Errors do not contain a backtrace #2573

Closed
lunelson opened this issue Mar 7, 2018 · 0 comments
Closed

Errors do not contain a backtrace #2573

lunelson opened this issue Mar 7, 2018 · 0 comments

Comments

@lunelson
Copy link

lunelson commented Mar 7, 2018

I originally posted about this on node-sass; but it seems to be a bug in libsass so I'm reposting here. Certain errors are coming through without a backtrace, notably those thrown with the @errordirective itself. I made a repo that demonstrates the problem—simply clone and run npm i && npm t to see the comparison of @warn VS @error: the warning traces back through the import tree, the error does not.

WARNING: this is a warning
Backtrace:
        src/_warn-fn.scss:2, in function `warn`
        src/_partial.scss:10, in mixin `warn-error-test`
        src/test.scss:7

Error: this is an error
        on line 2 of src/_error-fn.scss
>>   @error '#{$str}';
   --^

https://github.com/lunelson/node-sass-error-trace

This only seems to happen with certain errors, and I thought I'd see if I could just post a PR to sass-spec that would show which ones fail; but I couldn't get it working on my system, and in any case the error testing there doesn't even deal with imports and backtraces (they are all flat, single-file), so that's probably why this has gone unnoticed.

node-sass       4.7.2   (Wrapper)       [JavaScript]
libsass         3.5.0.beta.2    (Sass Compiler) [C/C++]
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