Update article.md

"continues to closest" -> "continues to next closest". Consistent w/ usage in rest of explanation.
This commit is contained in:
Peter Roche 2020-01-29 00:07:49 -07:00 committed by GitHub
parent c8b717e936
commit 58205b3dfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,7 +100,7 @@ As we already noticed, `.catch` at the end of the chain is similar to `try..catc
In a regular `try..catch` we can analyze the error and maybe rethrow it if it can't be handled. The same thing is possible for promises.
If we `throw` inside `.catch`, then the control goes to the next closest error handler. And if we handle the error and finish normally, then it continues to the closest successful `.then` handler.
If we `throw` inside `.catch`, then the control goes to the next closest error handler. And if we handle the error and finish normally, then it continues to the next closest successful `.then` handler.
In the example below the `.catch` successfully handles the error: