summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/install-plugin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/scripts/install-plugin.ts')
-rw-r--r--packages/frontend/src/scripts/install-plugin.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/frontend/src/scripts/install-plugin.ts b/packages/frontend/src/scripts/install-plugin.ts
index ee218df018..1d1a8a3f77 100644
--- a/packages/frontend/src/scripts/install-plugin.ts
+++ b/packages/frontend/src/scripts/install-plugin.ts
@@ -64,7 +64,11 @@ export async function parsePluginMeta(code: string): Promise<AiScriptPluginMeta>
try {
ast = parser.parse(code);
} catch (err) {
- throw new Error('Aiscript syntax error');
+ if (err instanceof Error) {
+ throw new Error(`Aiscript syntax error\n${(err as Error).message}`);
+ } else {
+ throw new Error('Aiscript syntax error');
+ }
}
const meta = Interpreter.collectMetadata(ast);