-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add: Error Handling Section #43
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'a' caught error instead of 'an' right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'fix it'. as opposed to 'fix' would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'in the console' not 'in console'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
} | ||
``` | ||
|
||
The same goes for promises. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we split this out into another subsection? I've been liking just one Good/Bad for each subsection!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
39bc09f
to
100628c
Compare
@ryanmcdermott Thanks for the review. Updates made. |
Woo hoo! Thanks 🎉 |
No description provided.