commit 53706d633a0b796ec39fd2480c12af603b3541f4
parent 16706ba481963b8f6316445d361ee89e0058fece
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 7 Jun 2015 15:27:23 -0400
Make Zotero.HTTP exceptions instances of Error
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js
@@ -32,7 +32,7 @@ Zotero.HTTP = new function() {
Zotero.debug(e, 1);
}
};
-
+ this.UnexpectedStatusException.prototype = Object.create(Error.prototype);
this.UnexpectedStatusException.prototype.toString = function() {
return this.message;
};
@@ -44,6 +44,7 @@ Zotero.HTTP = new function() {
this.BrowserOfflineException = function() {
this.message = "XMLHttpRequest could not complete because the browser is offline";
};
+ this.BrowserOfflineException.prototype = Object.create(Error.prototype);
this.BrowserOfflineException.prototype.toString = function() {
return this.message;
};