Javascript Snippet
class RequestError {
constructor(detail) {
this.detail = detail;
this.message = `${this.detail.statusText}, ${this.detail.status}`;
}
}
RequestError.prototype = Error.prototype;function CheckError(name, message) {
this.name = name;
this.message = message || 'Default Message';
this.stack = (new Error()).stack;
}
CheckError.prototype = Object.create(Error.prototype);
CheckError.prototype.constructor = CheckError;Last updated