Replace case statement with error-code-to-error-class map #186

Merged
merged 1 commit into from Dec 3, 2012

Conversation

Projects
None yet
2 participants
Contributor

x3ro commented Dec 1, 2012

Splitting #184 into smaller pull requests.

DRYing up the RaiseOctokitError class by making it unnecessary to write
"error_message(response)" and such over and over. This required to load
the "octokit/error" definitions before "octokit/client" because the
error code to error class map is generated when the class is first
parsed.

RSpec:
Coverage:

Replace case statement with error code to error class map
DRYing up the RaiseOctokitError class by making it unnecessary to write
"error_message(response)" and such over and over. This required to load
the "octokit/error" definitions before "octokit/client" because the
error code to error class map is generated when the class is first
parsed.

pengwynn added a commit that referenced this pull request Dec 3, 2012

Merge pull request #186 from x3ro/octokit-error-map
Replace case statement with error-code-to-error-class map

@pengwynn pengwynn merged commit 3274e65 into octokit:master Dec 3, 2012

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment