workadventure/front/src/Phaser/Reconnecting/WAError.ts

27 lines
649 B
TypeScript
Raw Normal View History

2021-01-17 22:40:54 +01:00
export class WAError extends Error {
private _title: string;
private _subTitle: string;
private _details: string;
2021-09-06 14:27:54 +02:00
constructor(title: string, subTitle: string, details: string) {
super(title + " - " + subTitle + " - " + details);
2021-01-17 22:40:54 +01:00
this._title = title;
this._subTitle = subTitle;
this._details = details;
// Set the prototype explicitly.
2021-09-06 14:27:54 +02:00
Object.setPrototypeOf(this, WAError.prototype);
2021-01-17 22:40:54 +01:00
}
get title(): string {
return this._title;
}
get subTitle(): string {
return this._subTitle;
}
get details(): string {
return this._details;
}
}