From 3e3f43be968400d297313bbd862272cd97d64bd3 Mon Sep 17 00:00:00 2001 From: Eran Landau Date: Thu, 6 Jul 2017 13:46:42 -0700 Subject: [PATCH] Include class name in exception --- .../java/com/netflix/governator/lifecycle/AnnotationFinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/governator-legacy/src/main/java/com/netflix/governator/lifecycle/AnnotationFinder.java b/governator-legacy/src/main/java/com/netflix/governator/lifecycle/AnnotationFinder.java index d5908802..7a967c24 100644 --- a/governator-legacy/src/main/java/com/netflix/governator/lifecycle/AnnotationFinder.java +++ b/governator-legacy/src/main/java/com/netflix/governator/lifecycle/AnnotationFinder.java @@ -113,7 +113,7 @@ public AnnotationVisitor visitAnnotation(String desc, boolean visible) { annotatedFields.add(selfClass().getDeclaredField(name)); break; } catch (NoSuchFieldException e) { - throw new IllegalStateException("Error visiting field " + name, e); + throw new IllegalStateException("Error visiting field " + name + " of class " + selfClass().getName(), e); } catch (NoClassDefFoundError e) { log.info("Unable to scan field '{}' of class '{}'", name, selfClass().getName(), e.getMessage()); }