www

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

commit 711b75ee66741a384846e997baf3969fefb5766a
parent b63886d37d13fb80d775de26749374428ccad992
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu,  6 Dec 2012 21:23:13 -0500

Fix exceptions in integration.js

Diffstat:
Mchrome/content/zotero/xpcom/integration.js | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js @@ -1015,7 +1015,7 @@ Zotero.Integration.Document.prototype._getSession = function _getSession(require this._session.setData(data); } catch(e) { // make sure style is defined - if(e instanceof Zotero.Integration.DisplayException && e.name === "invalidStyle") { + if(e instanceof Zotero.Exception.Alert && e.name === "integration.error.invalidStyle") { return this._session.setDocPrefs(this._doc, this._app.primaryFieldType, this._app.secondaryFieldType).then(function(status) { me._doc.setDocumentData(me._session.data.serializeXML()); @@ -1688,7 +1688,7 @@ Zotero.Integration.Fields.prototype.addEditCitation = function(field) { if(code) { var [type, content] = this.getCodeTypeAndContent(code); if(type != INTEGRATION_TYPE_ITEM) { - throw new Zotero.Integration.DisplayException("notInCitation"); + throw new Zotero.Exception.Alert("integration.error.notInCitation"); } try { @@ -2032,7 +2032,7 @@ Zotero.Integration.Session.prototype.setData = function(data) { } catch(e) { Zotero.logError(e); data.style.styleID = undefined; - throw new Zotero.Integration.DisplayException("invalidStyle"); + throw new Zotero.Exception.Alert("integration.error.invalidStyle"); } return true;