Add additional error logging for PDF reader and note editor
This commit is contained in:
parent
6ac663a002
commit
c9d4ff4314
4 changed files with 6 additions and 4 deletions
|
@ -132,7 +132,7 @@ class EditorInstance {
|
|||
this.saveSync();
|
||||
await Zotero.Notes.unregisterEditorInstance(this);
|
||||
if (!this._item.isAttachment()) {
|
||||
Zotero.Notes.deleteUnusedEmbeddedImages(this._item);
|
||||
await Zotero.Notes.deleteUnusedEmbeddedImages(this._item);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -742,6 +742,7 @@ class EditorInstance {
|
|||
}
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.logError(e);
|
||||
if (message && ['update', 'importImages'].includes(message.action)) {
|
||||
this._postMessage({ action: 'crash' });
|
||||
}
|
||||
|
|
|
@ -295,7 +295,7 @@ class ReaderInstance {
|
|||
await Zotero.Attachments.createDirectoryForItem(item);
|
||||
}
|
||||
file.append(this.pdfStateFileName);
|
||||
await OS.File.writeAtomic(file.path, JSON.stringify(state));
|
||||
await Zotero.File.putContentsAsync(file.path, JSON.stringify(state));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -648,6 +648,7 @@ class ReaderInstance {
|
|||
}
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.logError(e);
|
||||
let crash = message && ['setAnnotation'].includes(message.action);
|
||||
this._postMessage({
|
||||
action: crash ? 'crash' : 'error',
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8465a3abff643c6a1eea5288e625e5bc44aa1ab1
|
||||
Subproject commit 623c2370819a48988b91e7248c428bc0c28e7c0d
|
|
@ -1 +1 @@
|
|||
Subproject commit c939b9a572696f60a4334eadc2feefc155bdf7f8
|
||||
Subproject commit a12714e8b6e75daf9408193930c0774d2a3b94a1
|
Loading…
Add table
Add a link
Reference in a new issue