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

SyntaxError API #67

Closed
dherman opened this issue Apr 21, 2016 · 0 comments
Closed

SyntaxError API #67

dherman opened this issue Apr 21, 2016 · 0 comments

Comments

@dherman
Copy link
Collaborator

dherman commented Apr 21, 2016

Need an API for exposing SyntaxError, similar to neon::js::error::JsTypeError.

dherman pushed a commit that referenced this issue Apr 25, 2016
There are only a fixed set of Error classes, because even though V8 offers the `Error.captureStackTrace` API for decorating an object with Error-like properties, `IsNativeError` still reports `false` for such an object. So there's really no way with V8 to create custom subclasses of `Error`.

Since there's only a fixed set (and their constructors all have the same signature), they're enumerated in a concise `enum` and passed to `JsError::new` and `JsError::throw`.
@dherman dherman closed this as completed Apr 25, 2016
dherman added a commit that referenced this issue Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants