You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
361 B
17 lines
361 B
'use strict';
|
|
|
|
/** @typedef {Error & { code: number }} ConfigurationError */
|
|
|
|
/**
|
|
* Create configurationError from text and set CLI exit code.
|
|
*
|
|
* @param {string} text
|
|
* @returns {ConfigurationError}
|
|
*/
|
|
module.exports = function configurationError(text) {
|
|
const err = /** @type {ConfigurationError} */ (new Error(text));
|
|
|
|
err.code = 78;
|
|
|
|
return err;
|
|
};
|
|
|