From efffa7d7126a5835ce40fddb2e3668578be544b9 Mon Sep 17 00:00:00 2001 From: worksofliam Date: Mon, 2 Dec 2024 12:57:57 -0500 Subject: [PATCH] Wrap include parser in a try/catch Signed-off-by: worksofliam --- language/parser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/language/parser.js b/language/parser.js index 6e299685..93b08dc5 100644 --- a/language/parser.js +++ b/language/parser.js @@ -434,11 +434,17 @@ export default class Parser { if (includePath) { const include = await this.includeFileFetch(workingUri, includePath); if (include.found) { - await parseContent(include.uri, include.lines); scopes[0].includes.push({ toPath: include.uri, line: lineNumber }); + + try { + await parseContent(include.uri, include.lines); + } catch (e) { + console.log(`Error parsing include: ${include.uri}`); + console.log(e); + } } } }