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) {
|
||||
let ankiNote;
|
||||
let ankiNoteException;
|
||||
const ankiNoteErrors = [];
|
||||
const errors = [];
|
||||
try {
|
||||
const noteContext = this._getNoteContext();
|
||||
ankiNote = await this._createNote(dictionaryEntry, mode, noteContext, false, ankiNoteErrors);
|
||||
ankiNote = await this._createNote(dictionaryEntry, mode, noteContext, false, errors);
|
||||
} catch (e) {
|
||||
ankiNoteException = e;
|
||||
}
|
||||
@ -1972,6 +1972,9 @@ class Display extends EventDispatcher {
|
||||
if (typeof ankiNoteException !== 'undefined') {
|
||||
entry.ankiNoteException = ankiNoteException;
|
||||
}
|
||||
if (errors.length > 0) {
|
||||
entry.errors = errors;
|
||||
}
|
||||
ankiNotes.push(entry);
|
||||
}
|
||||
result.ankiNotes = ankiNotes;
|
||||
|
Loading…
Reference in New Issue
Block a user