Merge branch 'v2.0-dev'
[squeep-mystery-box] / lib / errors.js
diff --git a/lib/errors.js b/lib/errors.js
new file mode 100644 (file)
index 0000000..ec8d285
--- /dev/null
@@ -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