Log exceptions during project parsing

This commit is contained in:
aboyko
2023-11-14 12:48:22 -05:00
parent dca3c93a79
commit 6f0235a71b

View File

@@ -369,7 +369,7 @@ public class RewriteRecipeRepository {
}
return null;
});
List<SourceFile> sources = projectParser.parse(absoluteProjectDir, new InMemoryExecutionContext());
List<SourceFile> sources = projectParser.parse(absoluteProjectDir, new InMemoryExecutionContext(e -> log.error("Project Parsing error:", e)));
reportParseErrors(sources.stream().filter(ParseError.class::isInstance).map(ParseError.class::cast).collect(Collectors.toList()));
progressTask.progressEvent("Computing changes...");
RecipeRun reciperun = r.run(new InMemoryLargeSourceSet(sources), new InMemoryExecutionContext(e -> log.error("Recipe execution failed", e)));