zaach / jison

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

jison@0.4.17 throws non-Error #328

Open ericprud opened 8 years ago

ericprud commented 8 years ago

When I upgrade from jison@0.4.16 to jison@0.4.17 and pass an unrecognized token to the generated parser, I get back an object which is not an Error. 0.4.16 had:

    _parseError.prototype = new Error();

. 0.4.17 has something like (from memroy):

    _parseError.prototype = Error;

I don't know what the returned error is an instanceof, but it's not Error.

    _parseError.prototype = Error.prototye;

works for me (throws something which is an instanceof Error).

summivox commented 8 years ago

LiveScript just updated dependencies and this also hit us.

antonmedv commented 8 years ago

Got same in monkberry.

GerHobbelt commented 7 years ago

Wasn't this fixed with #325?

enwin commented 7 years ago

It has been fixed with #325 but has not been pushed to npm. Version 0.4.17 still has the old version of /lib/jison.js