MISC: Show user-friendly error message when there is syntax error in scripts (#1963)

This commit is contained in:
catloversg
2025-02-16 16:27:26 +07:00
committed by GitHub
parent 0a4598a9a0
commit 23bc4e8804
3 changed files with 56 additions and 24 deletions
+1 -1
View File
@@ -276,7 +276,7 @@ function Root(props: IProps): React.ReactElement {
}
let ast;
try {
ast = parseAST(newCode, getFileType(currentScript.path));
ast = parseAST(currentScript.path, currentScript.hostname, newCode, getFileType(currentScript.path));
makeModelsForImports(ast, server);
} catch (error) {
showRAMError({