outOfRange constant
int
const outOfRange
Operation was attempted past the valid range. E.g., seeking or reading past end of file.
Unlike invalidArgument, this error indicates a problem that may be fixed
if the system state changes. For example, a 32-bit file system will
generate invalidArgument if asked to read at an offset that is not in the
range 0,2^32-1
, but it will generate outOfRange if asked to read from
an offset past the current file size.
There is a fair bit of overlap between failedPrecondition and outOfRange. We recommend using outOfRange (the more specific error) when it applies so that callers who are iterating through a space can easily look for an outOfRange error to detect when they are done.
Implementation
static const outOfRange = 11;