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

Ability to capture swallowed promise rejections/errors #455

Open
ErkoKnoll opened this issue Jan 29, 2024 · 1 comment
Open

Ability to capture swallowed promise rejections/errors #455

ErkoKnoll opened this issue Jan 29, 2024 · 1 comment

Comments

@ErkoKnoll
Copy link

Hi,

With a simple code of:
new Promise(() => { }).then(() => { throw new Error('Swallowed error') });

a user can fire off a Promise, throw an error inside the promise chain without .catch method, and swallow the error.

I'm looking a way to capture these type of errors and print them out to the user, but the only option I can think of right now is to somehow wrap the underlying Promise implementation and add the special case.

I'm wondering if there are plans to add support for these cases, for example a global Isolate level callback that would get called every time such a case occurs so these cases can be easily captured.

@laverdet
Copy link
Owner

It would be nice but I don't have plans to do this any time soon.

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

2 participants