Update article.md

Add a comma, minor wording adjustments
This commit is contained in:
paroche 2019-10-08 19:44:47 -06:00 committed by GitHub
parent a88e082ef9
commit 169fa7bafe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,8 +25,8 @@ try {
It works like this: It works like this:
1. First, the code in `try {...}` is executed. 1. First, the code in `try {...}` is executed.
2. If there were no errors, then `catch(err)` is ignored: the execution reaches the end of `try` and goes on skipping `catch`. 2. If there were no errors, then `catch(err)` is ignored: the execution reaches the end of `try` and goes on, skipping `catch`.
3. If an error occurs, then `try` execution is stopped, and the control flows to the beginning of `catch(err)`. The `err` variable (can use any name for it) contains an error object with details about what's happened. 3. If an error occurs, then `try` execution is stopped, and the control flows to the beginning of `catch(err)`. The `err` variable (can use any name for it) will contain an error object with details about what happened.
![](try-catch-flow.svg) ![](try-catch-flow.svg)