Chevrotain / chevrotain

Parser Building Toolkit for JavaScript
https://chevrotain.io
Apache License 2.0
2.48k stars 204 forks source link

docs: IRecognitionException should extend 'Error' #1850

Closed benhohner closed 2 years ago

benhohner commented 2 years ago

IRecognitionException doesn't extend Error, so for example

parserInstance.errors[0].stack

is not recognized by typescript.

benhohner commented 2 years ago

Example of what I'm talking about available here: https://codesandbox.io/s/happy-feather-jepi7f?file=/src/components/parser.ts:1513-1535

bd82 commented 2 years ago

Thanks @benhohner 👍