Refactor try-catch for regex script execution

This commit is contained in:
kwaroran
2024-09-24 00:08:13 +09:00
parent 14313dbb77
commit 7b405c11b1

View File

@@ -262,7 +262,11 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter
parsedScripts.sort((a, b) => b.order - a.order) //sort by order parsedScripts.sort((a, b) => b.order - a.order) //sort by order
} }
for (const script of parsedScripts){ for (const script of parsedScripts){
executeScript(script) try {
executeScript(script)
} catch (error) {
console.error(error)
}
} }