Skip to content

Commit

Permalink
Add extra log information for failing visitor (#12910)
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 authored and vaadin-bot committed Feb 2, 2022
1 parent b3e39b4 commit b1f3e09
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,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 b1f3e09

Please sign in to comment.