Fix missing error logging when logging debug info (#1758)
This commit is contained in:
parent
8d1d428ed4
commit
f389b3c232
@ -1961,10 +1961,10 @@ class Display extends EventDispatcher {
|
|||||||
for (const mode of modes) {
|
for (const mode of modes) {
|
||||||
let ankiNote;
|
let ankiNote;
|
||||||
let ankiNoteException;
|
let ankiNoteException;
|
||||||
const ankiNoteErrors = [];
|
const errors = [];
|
||||||
try {
|
try {
|
||||||
const noteContext = this._getNoteContext();
|
const noteContext = this._getNoteContext();
|
||||||
ankiNote = await this._createNote(dictionaryEntry, mode, noteContext, false, ankiNoteErrors);
|
ankiNote = await this._createNote(dictionaryEntry, mode, noteContext, false, errors);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ankiNoteException = e;
|
ankiNoteException = e;
|
||||||
}
|
}
|
||||||
@ -1972,6 +1972,9 @@ class Display extends EventDispatcher {
|
|||||||
if (typeof ankiNoteException !== 'undefined') {
|
if (typeof ankiNoteException !== 'undefined') {
|
||||||
entry.ankiNoteException = ankiNoteException;
|
entry.ankiNoteException = ankiNoteException;
|
||||||
}
|
}
|
||||||
|
if (errors.length > 0) {
|
||||||
|
entry.errors = errors;
|
||||||
|
}
|
||||||
ankiNotes.push(entry);
|
ankiNotes.push(entry);
|
||||||
}
|
}
|
||||||
result.ankiNotes = ankiNotes;
|
result.ankiNotes = ankiNotes;
|
||||||
|
Loading…
Reference in New Issue
Block a user