Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better error handling

  • Loading branch information...
commit 4bc7b4595a54dccfc1f9524817d0c28b7548920f 1 parent 99d9fb2
@akaspin authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 http.js
View
4 http.js
@@ -43,7 +43,9 @@ Handler.prototype.next = function() {
};
Handler.prototype.error = function(code, reason) {
- throw new HandlerError(code, reason);
+ var op = this._chain[this._level];
+ var errGen = op['ERROR'] || ERROR;
+ this._handleError(new HandlerError(code, reason), errGen);
};
/**

0 comments on commit 4bc7b45

Please sign in to comment.
Something went wrong with that request. Please try again.