Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParserError messages don't seem to be propogated #25

Open
Fleker opened this issue Sep 16, 2019 · 3 comments
Open

ParserError messages don't seem to be propogated #25

Fleker opened this issue Sep 16, 2019 · 3 comments

Comments

@Fleker
Copy link

Fleker commented Sep 16, 2019

A grammar I'm developing seems to be throwing a ParserError, although I'm having a lot of trouble finding out exactly where the error is happening. To make matters more complicated, I seem to be unable to see the error messages that are coming out of the ParserError. It seems like the message parameter is not being propogated to the error object or accessible in the console.

Here's a simple test case.

> try { throw new Error('123') } catch (e) { console.error(e.toString()) }
Error: 123
undefined
> try { throw new ParserError('123') } catch (e) { console.error(e.toString()) }
Error
@Fleker
Copy link
Author

Fleker commented Sep 16, 2019

Seems like you're calling super(message), although that doesn't seem to be having an effect. But manually setting the message property in the constructor does seem to have an effect.

@Fleker
Copy link
Author

Fleker commented Sep 16, 2019

I get much better behavior on TypeScript 3.0+, so I think my dependency on this is out of date.

@Fleker Fleker closed this as completed Sep 16, 2019
@Fleker
Copy link
Author

Fleker commented Sep 16, 2019

Actually, now that I look at it some more, I'm going to reopen this. It seems like there hasn't been a release since the Typescript dependency has been updated, so this issue is still open.

@Fleker Fleker reopened this Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant