Inherit from this class

@name CustomErrors.inherit
@public
@param {(String|Object)} name
@param {String} [defmessage]
@param {Boolean} [abstract]
@param {Function} [construct]
@return {Function}
345144
function inherit(name, defmessage, abstract, construct) {
        if (typeof name === "object") {
            name.parent = this;
            return create(name);
        }
        return create(name, this, defmessage, abstract, construct);
    }
807978
function(expr, msg, negatedMsg, expected, showDiff){
        var msg = this.negate ? negatedMsg : msg
            , ok = this.negate ? !expr : expr
            , obj = this.obj;

        if (ok) return;

        var err = new AssertionError({
            message: msg.call(this)
            , actual: obj
            , expected: expected
            , stackStartFunction: this.assert
            , negated: this.negate
        });

        err.showDiff = showDiff;

        throw err;
    }
319351
function getError (type, expected, actual) {
        return {
            attribute: type,
            expected: expected,
            actual: actual,
            message: getMsg(type, expected)
        };
    }
300383
function getNamedError(obj) {
  if (obj && obj instanceof Error && 'name' in obj) {
    var Constructor = exports[obj.name];
    if (typeof Constructor === 'function') {
      var res = new Constructor(obj.message);
      if (res) {
        res.stack = obj.stack;
        return res;
      }
    }
  }
  return obj;
}
1212488
function WalletError(category, message, details, more) {
  more=more&&(': '+more)||''
  Error.call(this);
  Error.captureStackTrace(this, this.constructor);
  var status=parseInt(message),code=parseInt(details);
  this.category = category;
  this.code=code||undefined
  this.message = !isNaN(status)&&(messages.getStatus(status)+more)||message;
  this.details = code&&messages.getDescription(code)||details;
  this.name = this.constructor.name;
}
675257
function getErrorMessage (error) {
    // get schema from model
    var schema = this.model && this.model.schemaData && this.model.schemaData.properties
    // error message
    var message
    // get custom error message from schema if defined
    if (schema) {
        // if there is a base property get nested property
        if (error.baseProperty) {
            message = schema[error.baseProperty].items
                && schema[error.baseProperty].items.properties
                && schema[error.baseProperty].items.properties[error.property]
                && schema[error.baseProperty].items.properties[error.property].errors 
                && schema[error.baseProperty].items.properties[error.property].errors[error.keyword]
        }
        // get custom error message if any
        else {
            message = schema[error.property]
                && schema[error.property].errors
                && schema[error.property].errors[error.keyword]
        }
    }
    // if there is custom error message return it
    if (message) {
        return message
    }
    // default missing property error
    if (error.params && error.params.missingProperty) {
        return error.property+' required'
    }
    // default validation error
    else {
        return error.message
    }
}
122045
function (fn, name) {
  function proxiedFn() {
    'use strict';
    var fields = privates.get(this); // jshint ignore:line
    return fn.apply(fields, arguments);
  }

  Object.defineProperty(proxiedFn, 'name', {
    value: name,
    configurable: true
  });

  return proxiedFn;
}
1262439
function errmsg(msg) {
  const obj = this._obj,
        errorMessages = getErrorMessages(obj);
  this.assert(
    _.includes(errorMessages, msg),
    'expected #{this} to have an error message: #{errmsg}',
    'expected #{this} to not an error message: #{errmsg}',
    msg,   // expected
    errorMessages   // actual
  );
}
1373028
function ArgError (message) {
  if (!(this instanceof ArgError)) return ArgError.apply(this, arguments);
  // NOTE Error is a factory function, will return a new object regardless, so
  // Error.apply(this, arguments) will not work
  var e = /*new*/ Error(message);
  // NOTE must use Object.getOwnPropertyNames() bc .stack and .message are
  // non-enumerable
  Object.getOwnPropertyNames(e).forEach(function (key) {
    this[key] = e[key];
  }, this);
  this.name = "ArgError";
}
42709
function normalizeErr(err, config) {
  const { name, message, actual, expected, stack, showDiff } = err;
  let errMessage;
  let errDiff;

  /**
   * Check that a / b have the same type.
   */
  function sameType(a, b) {
    const objToString = Object.prototype.toString;
    return objToString.call(a) === objToString.call(b);
  }

  // Format actual/expected for creating diff
  if (showDiff !== false && sameType(actual, expected) && expected !== undefined) {
    /* istanbul ignore if */
    if (!(_.isString(actual) && _.isString(expected))) {
      err.actual = mochaUtils.stringify(actual);
      err.expected = mochaUtils.stringify(expected);
    }
    errDiff = config.useInlineDiffs ? createInlineDiff(err) : createUnifiedDiff(err);
  }

  // Assertion libraries do not output consitent error objects so in order to
  // get a consistent message object we need to create it ourselves
  if (name && message) {
    errMessage = `${name}: ${stripAnsi(message)}`;
  } else if (stack) {
    errMessage = stack.replace(/\n.*/g, '');
  }

  return {
    message: errMessage,
    estack: stack && stripAnsi(stack),
    diff: errDiff
  };
}
480903
function ConformaError(msg, errors) {
  Error.captureStackTrace(this, this.constructor);

  this.name = this.constructor.name;
  this.message = msg;
  this.errors  = errors || [];
}
1374570
function HttpError(message, options) {
    // handle constructor call without 'new'
    if (!(this instanceof HttpError)) {
        return new HttpError(message, options);
    }

    HttpError.super_.call(this);
    Error.captureStackTrace(this, this.constructor);
    this.name = 'HttpError';
    this.message = message;
    this.status = 500;

    options = options || {};
    if (options.code)     { this.code = options.code; }
    if (options.errors)   { this.errors = options.errors; }
    if (options.headers)  { this.headers = options.headers; }
    if (options.cause)    { this.cause = options.cause; }
}
1193686
function Question(name, message, options) {
  if (utils.isObject(name)) {
    options = utils.merge({}, message, name);
    message = options.message;
    name = options.name;
  }

  if (utils.isObject(message)) {
    options = utils.merge({}, options, message);
    message = options.message;
  }

  utils.define(this, 'isQuestion', true);
  utils.define(this, 'cache', {});

  this.options = options || {};
  this.type = this.options.type || 'input';
  this.message = message || this.options.message;
  this.name = name || this.options.name;

  if (!this.message) {
    this.message = this.name;
  }

  utils.merge(this, this.options);
  createNext(this);
}
128685
function BaseError(message) {
  if (message !== undefined) {
    defineProperty(this, "message", {
      configurable: true,
      value: message,
      writable: true,
    });
  }

  var cname = this.constructor.name;
  if (cname !== undefined && cname !== this.name) {
    defineProperty(this, "name", {
      configurable: true,
      value: cname,
      writable: true,
    });
  }

  captureStackTrace(this, this.constructor);
}
497972
function JFP_Error(message) {
    Error.call(this, message);

    Object.defineProperty(this, "name", {
        value: this.constructor.name
    });

    Object.defineProperty(this, "message", {
        value: message
    });

    if (Error.captureStackTrace) {
        Error.captureStackTrace(this, this.constructor);
    } else {
        Object.defineProperty(this, "stack", {
            value: (new Error()).stack
        });
    }
}
1263787
function TypeError (msg, spec, value) {
  const e = Error(msg)
  return Object.assign(e, { spec, value })
}
594363
function InvalidDerefInputError() {
    var instance = new Error("Deref can only be used with a non-primitive object from get, set, or call.");

    instance.name = "InvalidDerefInputError";

    if (Object.setPrototypeOf) {
        Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
    }

    if (Error.captureStackTrace) {
        Error.captureStackTrace(instance, InvalidDerefInputError);
    }

    return instance;
}