Add: Error Handling Section#43
Conversation
|
@ryanmcdermott - There is much more than can be added to this section but thought I'd start simple and see what you thought of the language and examples. |
ryanmcdermott
left a comment
There was a problem hiding this comment.
Hey Jordan, this is great, thank you for taking the time to add that! I think simple is good to start with. I'm interested to see how this progresses with others contributing to it. The section in Clean Code was very much Java-oriented and hard to adapt.
I added some very small nitpicks, if you have time could you knock them out? If not, totally cool, we can merge anyway!
| process (in Node), and notifying you in console with a stack trace. | ||
|
|
||
| ### Don't ignore caught errors | ||
| Doing nothing with an caught error doesn't give you the ability to ever fix |
There was a problem hiding this comment.
'a' caught error instead of 'an' right?
There was a problem hiding this comment.
'fix it'. as opposed to 'fix' would be better.
There was a problem hiding this comment.
Weird, I thought I had made the 'an' to 'a' grammar fix before pushing.
The 'fix' to 'fix it' isn't right though; what I have I believe is correct or else it would effectively read 'fix it said error'.
| Thrown errors are a good thing! They mean the runtime has successfully | ||
| identified when something in your program has gone wrong and it's letting | ||
| you know by stopping function execution on the current stack, killing the | ||
| process (in Node), and notifying you in console with a stack trace. |
There was a problem hiding this comment.
'in the console' not 'in console'?
| } | ||
| ``` | ||
|
|
||
| The same goes for promises. |
There was a problem hiding this comment.
Can we split this out into another subsection? I've been liking just one Good/Bad for each subsection!
39bc09f to
100628c
Compare
|
@ryanmcdermott Thanks for the review. Updates made. |
|
Woo hoo! Thanks 🎉 |
No description provided.