aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/Query.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2024-05-24 11:19:53 +0200
committerJon Bratseth <bratseth@vespa.ai>2024-05-24 11:19:53 +0200
commitbce5482b9f6a5817e2eca6c6a739a94f9ea66683 (patch)
tree7e31b56ae3f3a2a0c84906801dd6ec19fb2b189f /container-search/src/main/java/com/yahoo/search/Query.java
parent15e0ec64ff11215daecbbda85a4b3f69189280d6 (diff)
Include specific detail to inform in all invocation paths
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/Query.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/Query.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/Query.java b/container-search/src/main/java/com/yahoo/search/Query.java
index 4ec3fa358d2..e01d03e96a7 100644
--- a/container-search/src/main/java/com/yahoo/search/Query.java
+++ b/container-search/src/main/java/com/yahoo/search/Query.java
@@ -605,7 +605,7 @@ public class Query extends com.yahoo.processing.Request implements Cloneable {
*/
public void setHits(int hits) {
if (hits < 0)
- throw new IllegalArgumentException("Must be a positive number");
+ throw new IllegalArgumentException("'hits' must be a positive number, not " + hits);
this.hits = hits;
}
@@ -614,12 +614,12 @@ public class Query extends com.yahoo.processing.Request implements Cloneable {
*/
public void setOffset(int offset) {
if (offset < 0)
- throw new IllegalArgumentException("Must be a positive number");
+ throw new IllegalArgumentException("'offset' must be a positive number, not " + offset);
this.offset = offset;
}
/** Convenience method to set both the offset and the number of hits to return */
- public void setWindow(int offset,int hits) {
+ public void setWindow(int offset, int hits) {
setOffset(offset);
setHits(hits);
}