Skip to content

Commit cb64f2d

Browse files
committed
Tweak exception message to show why check failed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/net/branches/NET_2_0@781232 13f79535-47bb-0310-9956-ffa450edef68
1 parent ec990e6 commit cb64f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/apache/commons/net/util/SubnetUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ private int rangeCheck(int value, int begin, int end) {
213213
if (value > begin && value <= end) // (begin,end]
214214
return value;
215215

216-
throw new IllegalArgumentException("Value out of range: [" + value + "]");
216+
throw new IllegalArgumentException("Value [" + value + "] not in range ("+begin+","+end+"]");
217217
}
218218

219219
/*

0 commit comments

Comments
 (0)