Skip to content

Commit 2e318ad

Browse files
committed
More descriptive error message by including offending group name
1 parent 296db93 commit 2e318ad

File tree

1 file changed

+2
-2
lines changed
  • spring-shell-core/src/main/java/org/springframework/shell

1 file changed

+2
-2
lines changed

spring-shell-core/src/main/java/org/springframework/shell/Command.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ public Help(String description) {
4646
}
4747

4848
public Help(String description, String group) {
49-
Assert.isTrue(StringUtils.hasText(description), "Command description cannot be null or empty");
50-
this.description = description;
5149
this.group = StringUtils.hasText(group) ? group : "";
50+
Assert.isTrue(StringUtils.hasText(description), "Command description cannot be null or empty group='" + this.group + "'");
51+
this.description = description;
5252
}
5353

5454
public String getDescription() {

0 commit comments

Comments
 (0)