Skip to content

Commit

Permalink
Add extra log information for failing visitor
Browse files Browse the repository at this point in the history
Add error log for when a class
visitor fails with an exception for
easier debugging.

Fixes #12759
  • Loading branch information
caalador committed Feb 2, 2022
1 parent aa508e3 commit c154b0c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,11 @@ private EndPointData visitClass(String className, EndPointData endPoint,
try (InputStream is = url.openStream()) {
ClassReader cr = new ClassReader(is);
cr.accept(visitor, ClassReader.EXPAND_FRAMES);
} catch (Exception e) {
log().error(
"Visiting class {} failed with {}.\nThis might be a broken class in the project.",
className, e.getMessage());
throw e;
}

// all classes visited by the scanner, used for performance (#5933)
Expand Down

0 comments on commit c154b0c

Please sign in to comment.