src/util/error.js
class CoreError extends Error {
constructor(message, name = 'UNKNOWN') {
super(message);
Error.captureStackTrace(this, this.constructor);
this.key = name;
}
get name() {
return `CoreError [${this.key}]`;
}
}
module.exports = CoreError;