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

Better error stack trace when aborted for waitFor and asIterator #1

Open
Luluno01 opened this issue Aug 25, 2022 · 0 comments
Open

Comments

@Luluno01
Copy link
Member

Luluno01 commented Aug 25, 2022

Proposal: optimize error stack trace

Currently, the abortion error for waitFor and asIterator contains only information of the abortion point. A complete abortion error should indicate the following:

  1. Where the asynchronous operation was issued (caller stack trace of waitFor and asIterator)
  2. Why and where the asynchronous operation was aborted (whatever error caused the abortion and the stack trace of the abort call)

The implementation may use Error.captureStackTrace (may be polyfilled by constructing a new Error instance).

As a result, the new abortion error will have an additional cause property linked to the old abortion error.

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