repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor(ui): cleanup variables namespace
[e-mobility-charging-stations-simulator.git]
/
src
/
exception
/
BaseError.ts
diff --git
a/src/exception/BaseError.ts
b/src/exception/BaseError.ts
index 84421eac143b3db6440fd74cb2c8fc6ed8ec3eee..4a94fc26fd24bf952331c5a7cbb52bead8fdc0e7 100644
(file)
--- a/
src/exception/BaseError.ts
+++ b/
src/exception/BaseError.ts
@@
-1,12
+1,10
@@
export class BaseError extends Error {
export 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();
- }
+ 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)
}
}
}
}