UNPKG

diffusion

Version:

Diffusion JavaScript client

20 lines (16 loc) 443 B
/** * Defined reason code and message used to report error conditions. * * @typedef {Object} ErrorReason * @property {Number} id - The error reason's id * @property {String} reason - The error reason's description */ function ErrorReason(id, reason) { this.id = id; this.reason = reason; this.toString = function() { return id + ": " + reason; }; } ErrorReason.prototype = Error; module.exports = ErrorReason;