-
Notifications
You must be signed in to change notification settings - Fork 30k
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
No interpolation of template string when thrown #13402
Comments
Hmm, strange, it works for me in the repl:
|
I can't reproduce on macOS with 8.0.0 or master.
|
@Ryuno-Ki Can you provide the full literal output with the thrown error? |
Also unable to reproduce. |
@Ryuno-Ki Are you using source code processors / transpilers like babel? |
Ah, maybe it is not a bug, but a feature … $ cat test.js
let foo = "bar"
throw `${foo}baz`
$ node test.js
$HOME/Projects/$REPO/test.js:2
throw `${foo}baz`
^
barbaz But after adding an npm script for it and running that, I get $ npm run throwaway
> $REPO@$VERSION throwaway $HOME/Projects/$REPO
> node ./test.js
$HOME/Projects/$REPO/test.js:2
throw `${foo}baz`
^
barbaz
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! $REPO@$VERSION throwaway: `node ./test.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the $REPO@$VERSION throwaway script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! $HOME/.npm/_logs/2017-06-06T09_39_00_354Z-debug.log So it could be, that it outputted me a raw view of the file's content … In that case, sorry for the noise :) |
@Ryuno-Ki thank you for the clarification and follow up. |
Steps to reproduce
Expected result
Exception thrown with message
barbaz
.Actual result
Exception thrown with message
${foo}baz
.This does not happen on Firefox.
The text was updated successfully, but these errors were encountered: