Skip to content

Commit

Permalink
Add extra log information for failing visitor (#12910) (#12913)
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

Co-authored-by: caalador <[email protected]>
  • Loading branch information
vaadin-bot and caalador authored Feb 2, 2022
1 parent b3e39b4 commit 3b0b306
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 3b0b306

Please sign in to comment.