fix(ci): fix web ui build
[e-mobility-charging-stations-simulator.git] / src / exception / BaseError.ts
index 1471844cf4cf109e0df3895061b586d6c6c510c2..4a94fc26fd24bf952331c5a7cbb52bead8fdc0e7 100644 (file)
@@ -1,12 +1,10 @@
-export default class BaseError extends Error {
-  public constructor(message?: string) {
-    super(message);
-    this.name = new.target.name;
-    Object.setPrototypeOf(this, new.target.prototype);
-    Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.createStack();
-  }
+export class BaseError extends Error {
+  public date: Date
 
-  private createStack(): void {
-    this.stack = new Error().stack;
+  public constructor (message?: string) {
+    super(message)
+    this.name = new.target.name
+    this.date = new Date()
+    Object.setPrototypeOf(this, new.target.prototype)
   }
 }