Skip to content

Commit

Permalink
Only log errors when scanning mod file contents (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt authored Mar 4, 2024
1 parent efe2c67 commit 52148ce
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,13 @@ public ModFileScanData scan() {
}

private void fileVisitor(final Path path, final ModFileScanData result) {
LOGGER.debug(LogMarkers.SCAN,"Scanning {} path {}", fileToScan, path);
try (InputStream in = Files.newInputStream(path)){
ModClassVisitor mcv = new ModClassVisitor();
ClassReader cr = new ClassReader(in);
cr.accept(mcv, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG);
mcv.buildData(result.getClasses(), result.getAnnotations());
} catch (IOException | IllegalArgumentException e) {
// mark path bad
LOGGER.error(LogMarkers.SCAN,"Exception scanning {} path {}", fileToScan, path, e);
}
}
}

0 comments on commit 52148ce

Please sign in to comment.