Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You are missing my point, the issue is not that the error does not have a stacktrace, it's that it looks like:

    SyntaxError: Unexpected token u foo.js:123
    h foo.js:456
    g foo.js:789
    f
The issues are

* no reference to JSON.parse which is where the error occurred

* the error is not "object has no attribute toString", which would have made it clear what it's happening, but something else derived from having silently coerced "undefined" to string, which obscures what is happening.

As I wrote, it was a five minutes thing, not hours, but it's five minutes I would not have spent if it had been:

    TypeError: Cannot read property 'toString' of undefined: [native code]
    JSON.parse [native code]
    h foo.js:456
    g foo.js:789
    f


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: