Skip to content

Commit ba34b44

Browse files
authored
add method to exception (#1168)
IllegalArgumentException needs some context to be more useful
1 parent 8270d29 commit ba34b44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

implementation/src/main/java/io/smallrye/config/ConfigMappingInterface.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -783,10 +783,10 @@ static Property[] getProperties(Method[] methods, int si, int ti) {
783783
continue;
784784
}
785785
if (method.getParameterCount() > 0) {
786-
throw new IllegalArgumentException("Configuration methods cannot accept parameters");
786+
throw new IllegalArgumentException("Configuration methods cannot accept parameters: " + method);
787787
}
788788
if (method.getReturnType() == void.class) {
789-
throw new IllegalArgumentException("Void config methods are not allowed");
789+
throw new IllegalArgumentException("Void config methods are not allowed: " + method);
790790
}
791791
Property p = getPropertyDef(method, method.getAnnotatedReturnType());
792792
final Property[] array;

0 commit comments

Comments
 (0)