-
Notifications
You must be signed in to change notification settings - Fork 102
expose promise rejection tracker #422
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
Conversation
|
where would I put a test for this? |
|
ok, while this works, it causes ref_count errors, I got these logs when debugging I'll try debugging further tomorrow, do you have any insights on what needs to be changed? |
|
I think the refcount error happens because I capture Ctx in a closure here but I'm still trying to figure out how to do that differently |
|
the current iteration is sometimes causing the garbage collector to crash when shutting down, but otherwise does the job |
|
I'm happy to say I fixed it, I'll write a test tomorrow |
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.
Looks good, just need a change to the test to make sure it runs when parallel is enabled.
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.
LGTM
this enables users to write a custom onerror handler for uncaught rejected promises
the parameters are currently the same as the C API has, this function receives both handled and unhandled rejections.
For the purpose of onerror, you would ignore all calls where is_handled is true as below
example usage: