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

Implement Error stack property #904

Merged
merged 3 commits into from May 26, 2021
Merged

Conversation

KurtGokhan
Copy link
Contributor

@KurtGokhan KurtGokhan commented May 26, 2021

Some libraries can do things like Error().stack to get the current callstack. I did an implementation that is working but somewhat hacky maybe (using engine.GetLastSyntaxNode()).

It does not give the exactly same string as in V8 or other engines but afaik there is no spec that says what string to return. Only WIP spec is this: https://github.com/tc39/proposal-error-stacks

Copy link
Collaborator

@lahma lahma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is not part of the official spec and browser implementations vary, I think this is a fine and useful implementation. Thanks for this.

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

Successfully merging this pull request may close these issues.

None yet

2 participants