all files / blackbird/modules/utils/ MaxLengthExceededError.js

100% Statements 9/9
100% Branches 0/0
100% Functions 1/1
100% Lines 9/9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17                
const d = require("describe-property");
 
/**
 * An error indicating that some maximum length has been exceeded.
 */
function MaxLengthExceededError(maxLength) {
    Error.bind(this)();
    Error.captureStackTrace(this, this.constructor);
    this.name = this.constructor.name;
    this.message = "Maximum length exceeded";
    this.maxLength = maxLength;
}
 
MaxLengthExceededError.prototype = Object.create(Error.prototype, {constructor: d(MaxLengthExceededError)});
 
module.exports = MaxLengthExceededError;