Repository navigation
fix(zone.js): fix several behavior diffs when Promise reject unhandled - #49589
Closed
JiaLiPassion wants to merge 1 commit into
Closed
JiaLiPassion wants to merge 1 commit into
JiaLiPassion wants to merge 1 commit into
Conversation
JiaLiPassion
force-pushed
the
promise-reject
branch
2 times, most recently
from
March 25, 2023 04:50
f62f354 to
25f764e
Compare
JiaLiPassion
requested review from
alan-agius4
and removed request for
AndrewKushnir
December 13, 2023 22:39
alan-agius4
reviewed
Dec 14, 2023
Contributor
There was a problem hiding this comment.
Can you explain why these tests have been added but disabled?
Contributor
Author
There was a problem hiding this comment.
Yeah, I refactored the test cases, now it can work in both nodejs and browser.
JiaLiPassion
force-pushed
the
promise-reject
branch
from
December 14, 2023 13:41
25f764e to
325bf67
Compare
Contributor
|
@JiaLiPassion looks like there are some failures that are caused by this change https://github.com/angular/angular/actions/runs/7209705372/job/19641215951?pr=49589 |
There are several behavior differences between ZoneAwarePromise and
Native Promise.
Such as.
```
Promise.reject(new Error("test error")).finally(() => console.log("finally"));
```
1. Native Promise, will console log `finally` and throw a Promise
unhandled error also process exit with code 1.
2. ZoneAwarePromise, will console log `finally` but will not output any
uncaught error also process exit with code 0.
This PR fix the issue and make Promise rejection behave the same with
the native one.
PR Close angular#47562
JiaLiPassion
force-pushed
the
promise-reject
branch
from
December 14, 2023 14:26
325bf67 to
3035927
Compare
Contributor
Author
|
@alan-agius4 , I updated the PR, now CI is green. |
alan-agius4
approved these changes
Dec 14, 2023
Contributor
Contributor
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #47562
There are several behavior differences between ZoneAwarePromise and Native Promise.
Such as.
finallyand throw a Promise unhandled error also process exit with code 1.finallybut will not output any uncaught error also process exit with code 0.This PR fix the issue and make Promise rejection behave the same with the native one.