UNPKG

ext-manager

Version:

A package to manage an extensions for event listeners or discord bot commands with ease

29 lines (23 loc) 631 B
'use strict' /** * A custom error for the package to throwing error. * @extends {Error} */ class ExtError extends Error { /** * @param {String} message The error message * @param {String} [code] The error code * @param {String} [path] The path of the problem */ constructor (message, code, path) { super(`ExtError: ${message}`) if (Error.captureStackTrace) { Error.captureStackTrace(this, ExtError) } this.name = 'ExtError' this.code = `3XT${code || ''}` this.message = message if (path) this.path = path } } module.exports = ExtError