Skip to content

Commit

Permalink
Merge pull request #714 from QIvan/feature/ip-parsing-log
Browse files Browse the repository at this point in the history
[Java] expand error message while parsing ip address
  • Loading branch information
mjpt777 authored Oct 11, 2019
2 parents 3589762 + 89f03ae commit f69dfea
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ else if (c < '0' || '9' < c)
return new InetSocketAddress(hostname, port);
}

throw new IllegalArgumentException("The 'port' portion of the address is required");
throw new IllegalArgumentException(
"The 'port' portion of the address is required for ipv4 address " + cs);
}

private static InetSocketAddress tryParseIpV6(final CharSequence cs)
Expand Down Expand Up @@ -188,6 +189,7 @@ else if (c < '0' || '9' < c)
return new InetSocketAddress(hostname, port);
}

throw new IllegalArgumentException("The 'port' portion of the address is required");
throw new IllegalArgumentException(
"The 'port' portion of the address is required for ipv6 address " + cs);
}
}

0 comments on commit f69dfea

Please sign in to comment.