0f41c331b73aabdcbf12bb6da19ef8a51c6c6cfb
[e-mobility-charging-stations-simulator.git] / src / exception / BaseError.ts
1 export class BaseError extends Error {
2 public constructor (message?: string) {
3 super(message)
4 this.name = new.target.name
5 Object.setPrototypeOf(this, new.target.prototype)
6 if (this.stack == null && typeof BaseError.captureStackTrace === 'function') {
7 BaseError.captureStackTrace(this, this.constructor)
8 }
9 }
10 }