From 7b405c11b13585c8e265824a0c7d7dfcd937b3bd Mon Sep 17 00:00:00 2001 From: kwaroran Date: Tue, 24 Sep 2024 00:08:13 +0900 Subject: [PATCH] Refactor try-catch for regex script execution --- src/ts/process/scripts.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ts/process/scripts.ts b/src/ts/process/scripts.ts index 6436720e..2ae07c0b 100644 --- a/src/ts/process/scripts.ts +++ b/src/ts/process/scripts.ts @@ -262,7 +262,11 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter parsedScripts.sort((a, b) => b.order - a.order) //sort by order } for (const script of parsedScripts){ - executeScript(script) + try { + executeScript(script) + } catch (error) { + console.error(error) + } }