Skip to content

Commit

Permalink
add method to exception (#1168)
Browse files Browse the repository at this point in the history
IllegalArgumentException needs some context to be more useful
  • Loading branch information
plathub committed May 14, 2024
1 parent 8270d29 commit ba34b44
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -783,10 +783,10 @@ static Property[] getProperties(Method[] methods, int si, int ti) {
continue;
}
if (method.getParameterCount() > 0) {
throw new IllegalArgumentException("Configuration methods cannot accept parameters");
throw new IllegalArgumentException("Configuration methods cannot accept parameters: " + method);
}
if (method.getReturnType() == void.class) {
throw new IllegalArgumentException("Void config methods are not allowed");
throw new IllegalArgumentException("Void config methods are not allowed: " + method);
}
Property p = getPropertyDef(method, method.getAnnotatedReturnType());
final Property[] array;
Expand Down

0 comments on commit ba34b44

Please sign in to comment.