X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fexception%2FBaseError.ts;h=4a94fc26fd24bf952331c5a7cbb52bead8fdc0e7;hb=86545028054a9b13982500366c51e7ea2503a4eb;hp=0f41c331b73aabdcbf12bb6da19ef8a51c6c6cfb;hpb=f7be0fbec76c70ae3281f6b0449a7634cd9a091d;p=e-mobility-charging-stations-simulator.git diff --git a/src/exception/BaseError.ts b/src/exception/BaseError.ts index 0f41c331..4a94fc26 100644 --- a/src/exception/BaseError.ts +++ b/src/exception/BaseError.ts @@ -1,10 +1,10 @@ export class BaseError extends Error { + public date: Date + public constructor (message?: string) { super(message) this.name = new.target.name + this.date = new Date() Object.setPrototypeOf(this, new.target.prototype) - if (this.stack == null && typeof BaseError.captureStackTrace === 'function') { - BaseError.captureStackTrace(this, this.constructor) - } } }