File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
1-js/11-async/08-async-await/04-promise-all-failure Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ async function run() {
5555 try {
5656 await Promise .all ([
5757 // these 3 parallel jobs take different time: 100, 200 and 300 ms
58- // we use delay helper for this effect
58+ // we use delay helper to achieve this effect
5959* ! *
6060 delay (() => database .query (true ), 100 ),
6161 delay (() => database .query (false ), 200 ),
@@ -72,7 +72,7 @@ async function run() {
7272run ();
7373```
7474
75- Two of these queries are (by chance) unsuccessful, but we handle it by wrapping the ` Promise.all ` call into a ` try..catch ` block.
75+ Two of these queries happen to be unsuccessful, but we're smart enough to wrap the ` Promise.all ` call into a ` try..catch ` block.
7676
7777However, this doesn't help! This script actually leads to an uncaught error in console!
7878
You can’t perform that action at this time.
0 commit comments