Skip to content

Commit

Permalink
feat(connection-errors): add some connection-related errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Jun 18, 2015
1 parent 47bdd54 commit f465c3e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions lib/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,29 @@ errors.InvalidStateError = function(msg) {
this.name = 'AmqpInvalidStateError';
};
util.inherits(errors.InvalidStateError, errors.BaseError);

/**
* Connection error
*
* @param msg
* @extends BaseError
* @constructor
*/
errors.ConnectionError = function(msg) {
errors.BaseError.call(this, msg);
this.name = 'AmqpConnectionError';
};
util.inherits(errors.ConnectionError, errors.BaseError);

/**
* Disconnected error
*
* @param msg
* @extends ConnectionError
* @constructor
*/
errors.DisconnectedError = function(msg) {
errors.ConnectionError.call(this, msg);
this.name = 'AmqpDisconnectedError';
};
util.inherits(errors.DisconnectedError, errors.ConnectionError);

0 comments on commit f465c3e

Please sign in to comment.