zaach / jison

Bison in JavaScript.
http://jison.org
4.34k stars 448 forks source link

parseError does not show any useful information #318

Closed polybuildr closed 8 years ago

polybuildr commented 8 years ago

On a parse error, no useful information gets shown:

/tmp/a1/sql.js:143
        throw new _parseError(str, hash);
        ^
Error
    at Object.parseError (/tmp/a1/sql.js:141:33)
    at Object.parse (/tmp/a1/sql.js:208:22)
    at Object.commonjsMain [as main] (/tmp/a1/sql.js:661:27)
    at Object.<anonymous> (/tmp/a1/sql.js:664:11)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)

This happens in spite of #266.

polybuildr commented 8 years ago

There was a small error in #266, submitting a PR to fix.

anandanand84 commented 8 years ago

+1 this issue makes the library not usable. I had to use the try out online to figure out the error.