-
-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
As I understand. It
- Add code point to unexpected token
parseJson('abcde')
Uncaught:
JSONError: Unexpected token 'a', "abcde" is not valid JSON while parsing 'abcde'
at Module.parseJson (<CWD>/index.js:78:20)
at REPL15:1:69 {
fileName: undefined,
codeFrame: undefined,
rawCodeFrame: undefined
}
but it doesn't work anymore, since Node.js changed the error message.
This is a good feature, but we can do it in this code base ourself.
- It add part of code to the message.
JSONError: Unterminated string in JSON at position 11 while parsing '{"foo: bar}'
> 1 | {"foo: bar}
| ^
We already have code frame in the message, it seems unnecessary. Even confusing some time.
"abcde" is not valid JSON while parsing 'abcde'
Metadata
Metadata
Assignees
Labels
No labels