X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Ferrors.js;fp=lib%2Ferrors.js;h=ec8d285bbe4ecee5db3f699de2939101df2ce695;hb=6c9e123b3c10ef5caafc1a5f352a4705a8579ca9;hp=0000000000000000000000000000000000000000;hpb=2ef5f9c74d92c8eb8cc0bd03fecc9d1a1d306489;p=squeep-mystery-box 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