We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7c7bd4 commit 100a0c2Copy full SHA for 100a0c2
promises.tex
@@ -326,7 +326,13 @@ \section{Promises}\label{s:promises-promises}
326
327
\noindent
328
then the error message won't appear
329
-because the call to \texttt{fetch} doesn't raise an exception right away.
+because the function \texttt{fetch} is asynchronous.
330
+
331
+There are two passes of execution in this block:
332
+The first is the \texttt{try...catch} event loop,
333
+and the second is \texttt{fetch}.
334
+JavaScript rips the asynchronous code right out of the execution context!
335
+There's no error, because \texttt{fetch} never got the chance to run.
336
337
Going back to the \texttt{fs-extra.stat} example above,
338
what if we want to process multiple files,
0 commit comments