Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upthrowing template strings shows as an error #1229
Comments
This comment has been minimized.
This comment has been minimized.
|
is this expected behavior? https://eslint.org/docs/1.10.3/rules/no-throw-literal |
This comment has been minimized.
This comment has been minimized.
|
This is expected behavior. It's best practice to only throw There are a number of drawbacks with throwing strings, most notably you don't get any stack traces. It's also unexpected e.g. when |
LinusU
closed this
Nov 14, 2018
lock
bot
locked as resolved and limited conversation to collaborators
Feb 12, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
codebam commentedNov 13, 2018
What version of standard?
12.0.1
What operating system, Node.js, and npm version?
Arch Linux, v11.1.0, 6.4.1
What did you expect to happen?
I expected to not see an error
What actually happened?
I saw an error
Example:
This displays the message:
However this is completely valid code in Node.js, and it runs just fine.