Skip to content

Commit 9a40e29

Browse files
author
Pawel Bobruk
committed
Error messages when parameters problem occurred.
1 parent 9065584 commit 9a40e29

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main/java/pl/allegro/tech/search/elasticsearch/tools/reindex/ReindexCommandParser.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public boolean tryParse(String... args) {
2525
buildReindexParameters(command);
2626

2727
} catch (ParameterException | ParsingElasticsearchAddressException exception) {
28+
JCommander.getConsole().println("Parameters error occurred:");
29+
JCommander.getConsole().println(exception.getMessage());
30+
JCommander.getConsole().println("");
31+
2832
jCommander.usage();
2933
return false;
3034
}

src/main/java/pl/allegro/tech/search/elasticsearch/tools/reindex/connection/ElasticAddressParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public ElasticAddress parse(String uri) {
1717
elasticAddress.setTypeName(matcher.group(4));
1818
return elasticAddress;
1919
} else {
20-
throw new ParsingElasticsearchAddressException("Could not parse ELS address:" + uri);
20+
throw new ParsingElasticsearchAddressException("Could not parse elasticsearch url: " + uri);
2121
}
2222
}
2323
}

0 commit comments

Comments
 (0)