Files
2023-11-27 20:58:54 +11:00

36 lines
639 B
JavaScript

export class AjaxError extends Error {
constructor(message, err = null, code = "UNDEFINED_CODE") {
super(message);
this.name = this.constructor.name;
this.errCode = code;
this.errOrig = err;
}
code() {
return this.errCode;
}
err() {
return this.errOrig;
}
type() {
return "AjaxError";
}
}
export class ApplicationError extends Error {
constructor(message, debug) {
super(message);
this.debugMsg = debug;
}
type() {
return "ApplicationError";
}
debug() {
return this.debugMsg || "N/A";
}
}