Make Zotero.HTTP exceptions instances of Error
This commit is contained in:
parent
16706ba481
commit
53706d633a
1 changed files with 2 additions and 1 deletions
|
@ -32,7 +32,7 @@ Zotero.HTTP = new function() {
|
||||||
Zotero.debug(e, 1);
|
Zotero.debug(e, 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
this.UnexpectedStatusException.prototype = Object.create(Error.prototype);
|
||||||
this.UnexpectedStatusException.prototype.toString = function() {
|
this.UnexpectedStatusException.prototype.toString = function() {
|
||||||
return this.message;
|
return this.message;
|
||||||
};
|
};
|
||||||
|
@ -44,6 +44,7 @@ Zotero.HTTP = new function() {
|
||||||
this.BrowserOfflineException = function() {
|
this.BrowserOfflineException = function() {
|
||||||
this.message = "XMLHttpRequest could not complete because the browser is offline";
|
this.message = "XMLHttpRequest could not complete because the browser is offline";
|
||||||
};
|
};
|
||||||
|
this.BrowserOfflineException.prototype = Object.create(Error.prototype);
|
||||||
this.BrowserOfflineException.prototype.toString = function() {
|
this.BrowserOfflineException.prototype.toString = function() {
|
||||||
return this.message;
|
return this.message;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue