Better error message in case of 404

This commit is contained in:
David Négrier
2021-01-17 22:40:54 +01:00
parent 48c3f951bf
commit 4234b38910
4 changed files with 58 additions and 6 deletions
+26
View File
@@ -0,0 +1,26 @@
export class WAError extends Error {
private _title: string;
private _subTitle: string;
private _details: string;
constructor (title: string, subTitle: string, details: string) {
super(title+' - '+subTitle+' - '+details);
this._title = title;
this._subTitle = subTitle;
this._details = details;
// Set the prototype explicitly.
Object.setPrototypeOf (this, WAError.prototype);
}
get title(): string {
return this._title;
}
get subTitle(): string {
return this._subTitle;
}
get details(): string {
return this._details;
}
}