blob: ecaeae33ce1e934ad8d1ac5b78362c1746e2191e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
module.exports = class RequireModuleError extends Error {
constructor(error, moduleName) {
super(error.message);
this.name = 'RequireModuleError';
const stack = error.stack.split('\n').slice(1);
stack.unshift(this.toString());
this.stack = stack.join('\n');
this.meta = { moduleName };
}
};
|