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

Create error-handling.md #14

Closed
wants to merge 1 commit into from
Closed

Create error-handling.md #14

wants to merge 1 commit into from

Conversation

cozmo
Copy link
Contributor

@cozmo cozmo commented Apr 25, 2014

@nathanleiby To add some final comments and tweaks, other opinions welcome.


## What is error handling?

Applications have a expected flow, and due to external circumstances sometimes will deviate from this flow. This deviation is considered an error and has to be handled accordingly. We dive into this handling later in this spec.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/a expected/an expected/

Copy link
Contributor

Choose a reason for hiding this comment

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

this isn't really a spec, maybe "guide"?

Copy link
Member

Choose a reason for hiding this comment

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

This introduction makes it seem like errors are out of our control. I might consider removing this section and leading off with the definition of "error" i.e. the "what types of errors are there" section.

@mohit
Copy link
Contributor

mohit commented Jun 9, 2014

@templaedhel this needs some love. there are lots of TBD's around herer

@nathanleiby
Copy link
Contributor

@mohit - thanks for reminder. this has been on the backburner for awhile but I will take a look asap.

Across different programming languages, there are a variety of approaches to handle errors. I focus on the paradigms we've adopted at Clever based on our infrastructure (AWS, Heroku) and coding languages (CoffeeScript, Python, Go).

1. CoffeeScript/Javascript
- `Error` You can subclass the builtin Error class and throw different types of errors depending on the type of failure. You can then detect where a failure came from in a central error handler. Careful doing this though, there are [gotchas](https://github.com/Clever/clever-api/pull/155).
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a private link, so we should probably replace this with a link to a public version of this comment. maybe a blog post?

@cozmo cozmo closed this Aug 13, 2015
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.

5 participants