added lines and lines to errors
This commit is contained in:
parent
2a8e93e4be
commit
93bd4dc8fe
3 changed files with 22 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue