commit 69a962be9085dc1bc841bc82d9d8537910a20088
parent 7b062f3b15a5c21b8172a0547f01e0bd6e7cfee7
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 3 Jun 2010 03:09:10 +0000
return false when a locales file cannot be found, instead of throwing an error
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js
@@ -203,8 +203,12 @@ Zotero.Cite.System.retrieveLocale = function(lang) {
var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance();
xhr.open("GET", "chrome://zotero/content/locale/csl/locales-"+lang+".xml", false);
xhr.overrideMimeType("application/octet-stream");
- xhr.send();
- return xhr.responseText;
+ try {
+ xhr.send();
+ return xhr.responseText;
+ } catch(e) {
+ return false;
+ }
};
Zotero.Cite.System.getAbbreviations = function() {