enhance(frontend): improve aiscript plugin error handling

This commit is contained in:
syuilo 2023-11-06 11:21:43 +09:00
parent f72228f428
commit bfca457510
5 changed files with 35 additions and 13 deletions

View file

@ -750,7 +750,11 @@ async function post(ev?: MouseEvent) {
// plugin
if (notePostInterruptors.length > 0) {
for (const interruptor of notePostInterruptors) {
postData = await interruptor.handler(deepClone(postData));
try {
postData = await interruptor.handler(deepClone(postData));
} catch (err) {
console.error(err);
}
}
}