refactor: do not regenerate error stack strace needlessly
[e-mobility-charging-stations-simulator.git] / src / exception / BaseError.ts
CommitLineData
268a74bb 1export class BaseError extends Error {
2ebd83d0
JB
2 public date: Date
3
66a7748d
JB
4 public constructor (message?: string) {
5 super(message)
6 this.name = new.target.name
2ebd83d0 7 this.date = new Date()
66a7748d 8 Object.setPrototypeOf(this, new.target.prototype)
e7accadb
JB
9 }
10}