Comment #2 on issue 4332 by [email protected]: JSON.parse() fails
without helpful line number of line offset information when unexpected
token is encountered
https://code.google.com/p/v8/issues/detail?id=4332
This is a Chrome issue, not a V8 one. In d8, you would get this:
undefined:3: SyntaxError: Unexpected token t
"About to get a complaint about an unexpected" token "at some unknown
position in my JSON"
^
SyntaxError: Unexpected token t
at Object.parse (native)
at test.js:1:6
The reason for this is that in case we encounter a syntax error in the JSON
parser, we create a new script object from the JSON string. Apparently
Chrome Devtools does not display that in a sensible way.
The reason we have to create a new script object is that the string passed
to JSON.parse may not be a string literal, so there is no script position
to be obtained.
I'll file a Chromium bug.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.