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

fix(async): let async exception of deadline can be caught #1105

Merged
merged 3 commits into from
Aug 7, 2021

Conversation

justjavac
Copy link
Contributor

try {
  await deadline(Promise.reject("booom"), 20);
} catch (error) {
  console.log(`catch error: ${error}`);
}

will crash:

catch error: booom
error: Uncaught (in promise) booom

@bartlomieju
Copy link
Member

@justjavac looks good, could you add a test case that exercises provided example?

@justjavac
Copy link
Contributor Author

done

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks @justjavac

@ry ry merged commit 2edb58b into denoland:main Aug 7, 2021
@justjavac justjavac deleted the patch-1 branch August 8, 2021 14:30
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

Successfully merging this pull request may close these issues.

3 participants