www

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

commit be7cc45c0ecc38c4b129d42e40c228d8c0b96bea
parent a92d4694669aef828381d59bf9650995f8f3310d
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 12 May 2017 17:53:19 -0400

Better debug logging for CR error

Diffstat:
Mchrome/content/zotero/xpcom/data/item.js | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -1972,7 +1972,8 @@ Zotero.Item.prototype.hasNote = Zotero.Promise.coroutine(function* () { **/ Zotero.Item.prototype.getNote = function() { if (!this.isNote() && !this.isAttachment()) { - throw ("getNote() can only be called on notes and attachments"); + throw new Error("getNote() can only be called on notes and attachments " + + `(${this.libraryID}/${this.key} is a {Zotero.ItemTypes.getName(this.itemTypeID)})`); } // Store access time for later garbage collection