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

JS driver - Expose the errors constructors #1926

Closed
neumino opened this issue Jan 31, 2014 · 3 comments
Closed

JS driver - Expose the errors constructors #1926

neumino opened this issue Jan 31, 2014 · 3 comments
Assignees
Milestone

Comments

@neumino
Copy link
Member

neumino commented Jan 31, 2014

When checking the type of the error, one way to do it is through the attribute name.

We can also export the constructor so people can check if an error is an instanceof constructors.

It's pretty easy to do, and is just a few lines of code.

@ghost ghost assigned neumino Jan 31, 2014
neumino pushed a commit that referenced this issue Jan 31, 2014
@neumino
Copy link
Member Author

neumino commented Jan 31, 2014

Up in review 1177 assigned to @AtnNn
Branch michel_1926_js_errors

> r.error("foo").run(c, function(e, result) { console.log(e instanceof r.Error.RqlRuntimeError) })
undefined
> true

@neumino
Copy link
Member Author

neumino commented Jan 31, 2014

Review complete.

Merged in next as 9198850
Cherry picked in v1.11.x as 8ff6dbe

@neumino neumino closed this as completed Jan 31, 2014
@dminkovsky
Copy link

Gracias!

@AtnNn AtnNn modified the milestones: subsequent, 1.11.x Feb 13, 2014
@AtnNn AtnNn modified the milestones: 1.12, 1.11.x Mar 24, 2014
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

3 participants