Skip to content

Commit

Permalink
Wrap include parser in a try/catch
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Dec 2, 2024
1 parent f3255c0 commit efffa7d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion language/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit efffa7d

Please sign in to comment.