-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Improve error messages when JS code throws exceptions #173
Improve error messages when JS code throws exceptions #173
Conversation
…can improve error reporting by not hiding the information we get form the JS crash
Hey @kateinoigakukun thank you so much for your help. I applied the changes you suggested but I've found one test I can't fix related to JSClosure. |
…nction_with_this and _call_function instead of the unsafe version we created
Thanks for the tip @j-f1 I didn't notice the code was being invoked from |
…ption Co-authored-by: Jed Fox <git@jedfox.com>
…n exception as Jed suggested
…ate a new test case for the new functionality
…nction implementation
@j-f1 @kateinoigakukun thank you all for your comments and your review. I think I've applied all your suggestions. Please let me know if you want me to review any other detail or change anything 😃 Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one more thing. Could you bump up the interface version in
JavaScriptKit/Runtime/src/index.ts
Line 17 in b6b7b98
private version: number = 705; return 705;
No need to be sorry @kateinoigakukun 😃 Version value updated from 705 to 706! |
Thank you very much! |
I'd be happy to wait a bit more to include DOMKit improvements, but #173 has been highly requested to be included in a release sooner rather than later. After all, this means that we have less pressure to rush DOMKit-related changes out in this release.
We've noticed when JS code throws an exception evaluated from
JSFunction
the error reported shows this message:After reviewing this with the team, @kateinoigakukun suggested there where a try/catch capturing the exception we should remove in order to improve this scenario.
This PR adds two new unsafe versions of already existing functions where the JS side of the project doesn't capture any exception so the final result is a better error reporting like this: