Skip to content

Commit

Permalink
Improve error message for production panel customization. (#11753)
Browse files Browse the repository at this point in the history
* Improve error message for production panel customization.

* Use a stream instead.
  • Loading branch information
asvitkine committed Jul 10, 2023
1 parent fa68931 commit 1b08bc2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,12 @@ private void checkLists(final List<Tuple<String, List<Rule>>> ruleLists) {
}
}
if (!rulesCopy.isEmpty()) {
final String missing =
rulesCopy.stream()
.map(rule -> rule.getProductionRule().getName())
.collect(Collectors.joining(", "));
throw new IllegalStateException(
"production_tabs: must include all player production rules/units");
"production_tabs: must include all player production rules/units; missing: " + missing);
}
}

Expand Down

0 comments on commit 1b08bc2

Please sign in to comment.