diff options
Diffstat (limited to 'ext/bg/js/anki-note-builder.js')
-rw-r--r-- | ext/bg/js/anki-note-builder.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/bg/js/anki-note-builder.js b/ext/bg/js/anki-note-builder.js index eae5fbe4..e1399f66 100644 --- a/ext/bg/js/anki-note-builder.js +++ b/ext/bg/js/anki-note-builder.js @@ -117,7 +117,11 @@ class AnkiNoteBuilder { try { return await this._renderTemplate(templates, data, marker); } catch (e) { - if (errors) { errors.push(e); } + if (errors) { + const error = new Error(`Template render error for {${marker}}`); + error.data = {error: e}; + errors.push(error); + } return `{${marker}-render-error}`; } }); |