Skip to content

Commit efffa7d

Browse files
committed
Wrap include parser in a try/catch
Signed-off-by: worksofliam <[email protected]>
1 parent f3255c0 commit efffa7d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

language/parser.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,17 @@ export default class Parser {
434434
if (includePath) {
435435
const include = await this.includeFileFetch(workingUri, includePath);
436436
if (include.found) {
437-
await parseContent(include.uri, include.lines);
438437
scopes[0].includes.push({
439438
toPath: include.uri,
440439
line: lineNumber
441440
});
441+
442+
try {
443+
await parseContent(include.uri, include.lines);
444+
} catch (e) {
445+
console.log(`Error parsing include: ${include.uri}`);
446+
console.log(e);
447+
}
442448
}
443449
}
444450
}

0 commit comments

Comments
 (0)