This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
2020-11-01 22:46:04 +00:00

21 lines
400 B
JavaScript

'use strict';
class NoFilesFoundError extends Error {
/**
* @param {string|string[]} fileList
*/
constructor(fileList) {
super();
if (typeof fileList === 'string') {
fileList = [fileList];
}
const pattern = fileList.filter((i) => !i.startsWith('!')).join(', ');
this.message = `No files matching the pattern "${pattern}" were found.`;
}
}
module.exports = NoFilesFoundError;