configurationError.js 281 B

123456789101112131415
  1. 'use strict';
  2. /**
  3. * Create configurationError from text and set CLI exit code
  4. * @param {string} text
  5. * @returns {Object}
  6. */
  7. module.exports = function (text) /* Object */ {
  8. /** @type {Error & {code?: number}} */
  9. const err = new Error(text);
  10. err.code = 78;
  11. return err;
  12. };