diff options
| author | KevinWh0 <45321184+KevinWh0@users.noreply.github.com> | 2024-02-02 21:32:08 +0100 |
|---|---|---|
| committer | KevinWh0 <45321184+KevinWh0@users.noreply.github.com> | 2024-02-02 21:32:08 +0100 |
| commit | 93bd4dc8fe08cb0b075caac4e4dc0993a49a0ed8 (patch) | |
| tree | 772bb363029c678faf0a8b1b448645d11520a835 /packages/frontend/src/scripts/install-plugin.ts | |
| parent | Fixed code injection from twitter import (diff) | |
| download | sharkey-93bd4dc8fe08cb0b075caac4e4dc0993a49a0ed8.tar.gz sharkey-93bd4dc8fe08cb0b075caac4e4dc0993a49a0ed8.tar.bz2 sharkey-93bd4dc8fe08cb0b075caac4e4dc0993a49a0ed8.zip | |
added lines and lines to errors
Diffstat (limited to 'packages/frontend/src/scripts/install-plugin.ts')
| -rw-r--r-- | packages/frontend/src/scripts/install-plugin.ts | 6 |
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); |