12 lines
255 B
JavaScript
12 lines
255 B
JavaScript
class CustomError extends Error {
|
|
|
|
constructor(message, name = null) {
|
|
super();
|
|
Error.captureStackTrace(this, this.constructor);
|
|
this.name = name || 'EnmapError';
|
|
this.message = message;
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = CustomError;
|