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

Add Exceptions #40

Closed
gfwilliams opened this issue Oct 1, 2013 · 2 comments
Closed

Add Exceptions #40

gfwilliams opened this issue Oct 1, 2013 · 2 comments

Comments

@gfwilliams
Copy link
Member

Add JavaScript exceptions - we just need to find a nice way of doing this that doesn't slow us down when we're not using them.

@gfwilliams
Copy link
Member Author

I've just pushed some code to handle Exceptions. It appears to work well enough now (at least for basic handling).

However: The interactive shell isn't aware of them, so doesn't display any errors. I think what's probably needed is:

  • Merge EXEC_ERROR into EXEC_EXCEPTION, and make the JS libraries throw exceptions instead of errors
  • Make sure the existing EXEC_ERROR handlers work ok in jsinteractive
  • jsinteractive should also be aware of exceptions when executing code at the command-line (currently it relies on the code producing the error to output it to the console).
  • Make code that previously output a stack trace to the console output it to the exception
  • Cope with out of memory errors. Could be painful as how do we allocate an exception??

@gfwilliams
Copy link
Member Author

Also see #316 - we should definitely throw reference errors

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