Class V2JsonRequestParams.InvalidOffsetException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.codelibs.fess.api.v2.handlers.InvalidRequestParameterException
org.codelibs.fess.api.v2.handlers.V2JsonRequestParams.InvalidPageSizeException
org.codelibs.fess.api.v2.handlers.V2JsonRequestParams.InvalidOffsetException
- All Implemented Interfaces:
Serializable
- Enclosing class:
V2JsonRequestParams
public static class V2JsonRequestParams.InvalidOffsetException
extends V2JsonRequestParams.InvalidPageSizeException
Thrown by
V2JsonRequestParams.getOffset() or V2JsonRequestParams.getStartPosition() when the
offset / start parameter is present but negative. Negative paging
positions are not meaningful and previously collided with the -1
"uninitialised" sentinel — handlers should catch this and map it to
V2ErrorCode.INVALID_REQUEST.
Extends V2JsonRequestParams.InvalidPageSizeException so existing handler catch blocks
that already map invalid paging input to INVALID_REQUEST also cover
the offset variant without per-handler edits. Test code that asserts
specifically on V2JsonRequestParams.InvalidOffsetException keeps working because
instanceof InvalidOffsetException narrows beyond the parent type.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidOffsetException(String message) Creates the exception with a diagnostic message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidOffsetException
Creates the exception with a diagnostic message.- Parameters:
message- human-readable description of the invalid offset
-