You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+5-13Lines changed: 5 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1357,6 +1357,8 @@ fetchPostById('gzIrzeo64')
1357
1357
1358
1358
Unless we add *try / catch* blocks around *await* expressions, uncaught exceptions – regardless of whether they were raised in the body of your *async* function or while it’s suspended during *await* – will reject the promise returned by the *async* function. [(Ref: PonyFoo)](https://ponyfoo.com/articles/understanding-javascript-async-await#error-handling).
1359
1359
1360
+
> **Note :** Promises behave the same!
1361
+
1360
1362
With promises, here is how you would handle the error chain:
1361
1363
1362
1364
```js
@@ -1365,29 +1367,19 @@ function getUser() { // This promise will be rejected!
0 commit comments