X-Git-Url: http://git.squeep.com/?p=squeep-mystery-box;a=blobdiff_plain;f=lib%2Ferrors.js;fp=lib%2Ferrors.js;h=ec8d285bbe4ecee5db3f699de2939101df2ce695;hp=0000000000000000000000000000000000000000;hb=db1b282631d29b21ca028ce39d8bb84a232612c3;hpb=5ce60de5e64a735e575fb02cf8944d1b1d4f000c diff --git a/lib/errors.js b/lib/errors.js new file mode 100644 index 0000000..ec8d285 --- /dev/null +++ b/lib/errors.js @@ -0,0 +1,16 @@ +'use strict'; + +class MysteryBoxError extends Error { + constructor(...args) { + super(...args); + Error.captureStackTrace(MysteryBoxError); + } + + get name() { + return this.constructor.name; + } +} + +module.exports = { + MysteryBoxError, +}; \ No newline at end of file