mirror of
https://github.com/google/nomulus
synced 2026-10-01 04:05:49 +00:00
Add debug string on checkArgument failure
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=184838852
This commit is contained in:
@@ -271,7 +271,11 @@ abstract class CreateOrUpdateTldCommand extends MutatingCommand {
|
|||||||
checkArgument(roidSuffix == null || tlds.size() == 1,
|
checkArgument(roidSuffix == null || tlds.size() == 1,
|
||||||
"Can't update roid suffixes on multiple TLDs simultaneously");
|
"Can't update roid suffixes on multiple TLDs simultaneously");
|
||||||
for (String tld : tlds) {
|
for (String tld : tlds) {
|
||||||
checkArgument(tld.equals(canonicalizeDomainName(tld)));
|
checkArgument(
|
||||||
|
tld.equals(canonicalizeDomainName(tld)),
|
||||||
|
"TLD '%s' should be given in the canonical form '%s'",
|
||||||
|
tld,
|
||||||
|
canonicalizeDomainName(tld));
|
||||||
checkArgument(
|
checkArgument(
|
||||||
!CharMatcher.javaDigit().matches(tld.charAt(0)),
|
!CharMatcher.javaDigit().matches(tld.charAt(0)),
|
||||||
"TLDs cannot begin with a number");
|
"TLDs cannot begin with a number");
|
||||||
|
|||||||
Reference in New Issue
Block a user