Skip to content

Commit

Permalink
Update as discussed in pull request #40
Browse files Browse the repository at this point in the history
  • Loading branch information
analog-nico committed Mar 20, 2015
1 parent 1d11365 commit b13a6c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ If you want to debug a test you should use `gulp test-without-coverage` to run a

### Main Branch

- v0.4.1 (2015-03-20)
- Improved Error types to work in browsers without v8 engine
*(Thanks to @nodiis for [pull request #40](https://github.com/tyabonil/request-promise/pull/40))*
- v0.4.0 (2015-02-08)
- Introduced Error types used for the reject reasons (See last part [this section](#rejected-promises-and-the-simple-option))
*(Thanks to @jakecraige for starting the discussion in [issue #38](https://github.com/tyabonil/request-promise/issues/38))*
Expand Down
12 changes: 4 additions & 8 deletions lib/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ function RequestError(cause) {
this.message = String(cause);
this.cause = cause;

if(Error.captureStackTrace){
Error.captureStackTrace(this);
} else {
Error.call(this);
if (Error.captureStackTrace) {
Error.captureStackTrace(this);
}

}
Expand All @@ -24,10 +22,8 @@ function StatusCodeError(statusCode, message) {
this.statusCode = statusCode;
this.message = statusCode + ' - ' + message;

if(Error.captureStackTrace){
Error.captureStackTrace(this);
} else {
Error.call(this);
if (Error.captureStackTrace) {
Error.captureStackTrace(this);
}

}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "request-promise",
"version": "0.4.0",
"version": "0.4.1",
"description": "The world-famous HTTP client 'Request' now Promises/A+ compliant. Powered by Bluebird.",
"keywords": [
"xhr",
Expand Down

0 comments on commit b13a6c1

Please # to comment.