Skip to content

Commit 0c87d60

Browse files
committed
include value in error message
1 parent 837e922 commit 0c87d60

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

x-pack/plugin/analytics/src/main/java/org/elasticsearch/xpack/analytics/mapper/TDigestFieldMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ public Builder(String name, boolean ignoreMalformedByDefault) {
9797
);
9898
this.compression = Parameter.intParam("compression", false, m -> toType(m).compression, DEFAULT_COMPRESSION).addValidator(c -> {
9999
if (c <= 0 || c > MAXIMUM_COMPRESSION) {
100-
throw new IllegalArgumentException("compression must be a positive integer between 1 and " + MAXIMUM_COMPRESSION);
100+
throw new IllegalArgumentException(
101+
"compression must be a positive integer between 1 and " + MAXIMUM_COMPRESSION + " was [" + c + "]"
102+
);
101103
}
102104
});
103105
}

0 commit comments

Comments
 (0)