www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 4283134d3297c89522b1e50b92818536b7816596
parent 156f2be26955cfa29979cf3bca40d85cb42ecc1f
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue,  1 Feb 2011 07:24:01 +0000

don't throw on locale not found, just return false


Diffstat:
Mchrome/content/zotero/xpcom/cite.js | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js @@ -199,7 +199,11 @@ Zotero.Cite.System.retrieveLocale = function(lang) { let protHandler = Components.classes["@mozilla.org/network/protocol;1?name=chrome"] .createInstance(Components.interfaces.nsIProtocolHandler); let channel = protHandler.newChannel(protHandler.newURI("chrome://zotero/content/locale/csl/locales-"+lang+".xml", "UTF-8", null)); - let rawStream = channel.open(); + try { + let rawStream = channel.open(); + } catch(e) { + return false; + } let converterStream = Components.classes["@mozilla.org/intl/converter-input-stream;1"] .createInstance(Components.interfaces.nsIConverterInputStream); converterStream.init(rawStream, "UTF-8", 65535,