mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix bundle execution error handling
This commit is contained in:
parent
ecbaffa5f3
commit
ee58bf3d5c
@ -9,6 +9,8 @@ async function getAndExecuteBundle(noteId, originEntity = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function executeBundle(bundle, originEntity) {
|
async function executeBundle(bundle, originEntity) {
|
||||||
|
console.log(bundle);
|
||||||
|
|
||||||
const apiContext = await ScriptContext(bundle.noteId, bundle.allNoteIds, originEntity);
|
const apiContext = await ScriptContext(bundle.noteId, bundle.allNoteIds, originEntity);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -17,7 +19,7 @@ async function executeBundle(bundle, originEntity) {
|
|||||||
}.call(apiContext));
|
}.call(apiContext));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
infoService.showAndLogError(`Execution of script "${bundle.note.title}" (${bundle.note.noteId}) failed with error: ${e.message}`);
|
infoService.showAndLogError(`Execution of ${bundle.noteId} failed with error: ${e.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user