UNPKG

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