Haha-Yes/node_modules/enmap/src/error.js
2018-09-06 15:02:53 +02:00

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;