amper5and/node-google-voice — pull request #5 by coolaj86 (2012-01-18 01:30:07+00:00)
Title: return real errors rather than integers

* created the error type `GoogleVoiceError`
* created the function `getError` which returns a GoogleVoiceError when given a status code
* regex replaced in vim `:%s/\(STATUSES\.\w\+\)/getError(\1)/gc` which wraps all `STATUSES.\w` with `getError()`
* tested that the code parses correctly
* tested a hard-coded `throw getError(STATUSES.GOOGLE_CLIENTLOGIN_ERROR)` - works
* tried to get a real authentication error, but there was an xml parse error in `googleclientlogin`, so it didn't get that far.