Browse Source

created new file for err

kaori 4 years ago
parent
commit
7a33d64b9d
1 changed files with 9 additions and 0 deletions
  1. 9 0
      packages/slackbot-proxy/src/models/errors.ts

+ 9 - 0
packages/slackbot-proxy/src/models/errors.ts

@@ -0,0 +1,9 @@
+export class MyError extends Error {
+
+  constructor(e?: string) {
+    super(e);
+    this.name = new.target.name;
+    Object.setPrototypeOf(this, new.target.prototype);
+  }
+
+}