1 export class BaseError
extends Error {
2 public constructor(message
?: string) {
4 this.name
= new.target
.name
;
5 Object.setPrototypeOf(this, new.target
.prototype
);
6 typeof Error.captureStackTrace
=== 'function'
7 ? Error.captureStackTrace(this, this.constructor
)
11 private createStack(): void {
12 this.stack
= new Error().stack
;