Skip to content

Commit 75787b5

Browse files
authored
Merge pull request #31592 from cunningt/adddebuginfo
Add debugging info to IllegalStateException (include the GACT string and the index)
2 parents f576c63 + 2c49d73 commit 75787b5

File tree

1 file changed

+3
-2
lines changed
  • independent-projects/bootstrap/app-model/src/main/java/io/quarkus/maven/dependency

1 file changed

+3
-2
lines changed

independent-projects/bootstrap/app-model/src/main/java/io/quarkus/maven/dependency/GACT.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ public GACT(String groupId, String artifactId, String classifier, String type) {
6666
public static String[] split(String str, String[] parts, int fromIndex) {
6767
int i = str.lastIndexOf(':', fromIndex - 1);
6868
if (i <= 0) {
69-
throw new IllegalArgumentException("GroupId and artifactId separating ':' is absent or not in the right place in '"
70-
+ str.substring(0, fromIndex) + "'");
69+
throw new IllegalArgumentException("Invalid coordinates '" + str
70+
+ "': groupId and artifactId separating character ':' is absent or not in the right place in the substring ending at index "
71+
+ fromIndex + ": '" + str.substring(0, fromIndex));
7172
}
7273
parts[3] = str.substring(i + 1, fromIndex);
7374
fromIndex = i;

0 commit comments

Comments
 (0)