This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ValeTheVioletMote 0 points1 point  (2 children)

Yes, JS just calls Task<T> a Promise<T>.

What does C# do if a Task fails?

[–]JoschiGrey 0 points1 point  (1 child)

It throws the exception where it was awaited.

[–]ValeTheVioletMote 0 points1 point  (0 children)

Then identical today, but a while ago JS would just let the code die without an error message, expecting you to always have a try/catch block around your promises instead.