Skip to content

Commit b753823

Browse files
committed
minor
1 parent 6d7b926 commit b753823

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

1-js/11-async/04-promise-error-handling/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ new Promise((resolve, reject) => {
140140
}
141141

142142
}).then(function() {
143-
/* doesn't runs here */
143+
/* doesn't run here */
144144
}).catch(error => { // (**)
145145

146146
alert(`The unknown error has occurred: ${error}`);
@@ -166,7 +166,7 @@ new Promise(function() {
166166

167167
In case of an error, the promise becomes rejected, and the execution should jump to the closest rejection handler. But there is none. So the error gets "stuck". There's no code to handle it.
168168

169-
In practice, just like with a regular unhandled errors in code, it means that something has terribly gone wrong.
169+
In practice, just like with regular unhandled errors in code, it means that something has terribly gone wrong.
170170

171171
What happens when a regular error occurs and is not caught by `try..catch`? The script dies with a message in console. Similar thing happens with unhandled promise rejections.
172172

0 commit comments

Comments
 (0)