Skip to content

Commit

Permalink
Improve error message. (#12694)
Browse files Browse the repository at this point in the history
Would help diagnose: #12626
  • Loading branch information
asvitkine committed Jul 5, 2024
1 parent d0db903 commit 0c711bd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,10 @@ public CasualtyDetails selectCasualties(

if (defaultCasualties.size() != count) {
throw new IllegalStateException(
"Select Casualties showing different numbers for number of hits to take vs total "
+ "size of default casualty selections");
String.format(
"Select Casualties showing different numbers for number of hits to take (%s) vs "
+ "total size of default casualty selections (%s) in %s (hit = %s)",
count, defaultCasualties.size(), battleSite, hit.getName()));
}
if (defaultCasualties.getKilled().isEmpty()) {
return new CasualtyDetails(defaultCasualties, false);
Expand Down

0 comments on commit 0c711bd

Please sign in to comment.