From 2e318ad604565816e1f6d3b25d41da10622df42e Mon Sep 17 00:00:00 2001 From: nicolas Date: Tue, 17 Dec 2019 22:22:31 -0500 Subject: [PATCH] gh-291 More descriptive error message by including offending group name --- .../src/main/java/org/springframework/shell/Command.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-shell-core/src/main/java/org/springframework/shell/Command.java b/spring-shell-core/src/main/java/org/springframework/shell/Command.java index f571a6f26..5e09ee00d 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/Command.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/Command.java @@ -46,9 +46,9 @@ public Help(String description) { } public Help(String description, String group) { - Assert.isTrue(StringUtils.hasText(description), "Command description cannot be null or empty"); - this.description = description; this.group = StringUtils.hasText(group) ? group : ""; + Assert.isTrue(StringUtils.hasText(description), "Command description cannot be null or empty group='" + this.group + "'"); + this.description = description; } public String getDescription() {