diff --git a/implementation/src/main/java/io/smallrye/config/ConfigMappingInterface.java b/implementation/src/main/java/io/smallrye/config/ConfigMappingInterface.java index e3ef35b99..ab4864fe1 100644 --- a/implementation/src/main/java/io/smallrye/config/ConfigMappingInterface.java +++ b/implementation/src/main/java/io/smallrye/config/ConfigMappingInterface.java @@ -935,7 +935,7 @@ private static String getPropertyName(final AnnotatedElement element) { WithName annotation = element.getAnnotation(WithName.class); if (annotation != null) { if (useParent) { - throw new IllegalArgumentException("Cannot specify both @ParentConfigName and @ConfigName"); + throw new IllegalArgumentException("Cannot specify both @WithParentName and @WithName in '" + element + "'"); } String name = annotation.value(); if (!name.isEmpty()) {