Skip to content
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

Merged

Conversation

jordalgo
Copy link
Contributor

@jordalgo jordalgo commented Jan 6, 2017

No description provided.

@jordalgo
Copy link
Contributor Author

jordalgo commented Jan 6, 2017

@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.

Copy link
Owner

@ryanmcdermott ryanmcdermott left a 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
Copy link
Owner

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?

Copy link
Owner

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.

Copy link
Contributor Author

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.
Copy link
Owner

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'?

Copy link
Contributor Author

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.
Copy link
Owner

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@jordalgo jordalgo force-pushed the jordalgo/errorHandling branch from 39bc09f to 100628c Compare January 7, 2017 02:23
@jordalgo
Copy link
Contributor Author

jordalgo commented Jan 7, 2017

@ryanmcdermott Thanks for the review. Updates made.

@ryanmcdermott ryanmcdermott merged commit ddd0181 into ryanmcdermott:master Jan 7, 2017
@ryanmcdermott
Copy link
Owner

Woo hoo! Thanks 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants