Skip to content

Commit

Permalink
Catch Exception when processing work units (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehutch committed Sep 4, 2021
1 parent 4fc27be commit 9745946
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/io/github/classgraph/Scanner.java
Expand Up @@ -749,6 +749,10 @@ public void processWorkUnit(final ClassfileScanWorkUnit workUnit,
if (subLog != null) {
subLog.log(workUnit.classfileResource.getPath(), "Could not read classfile: " + e);
}
} catch (final Exception e) {
if (subLog != null) {
subLog.log(workUnit.classfileResource.getPath(), "Could not read classfile", e);
}
} finally {
if (subLog != null) {
subLog.addElapsedTime();
Expand Down

0 comments on commit 9745946

Please sign in to comment.