Exception: Google::Cloud::OutOfRangeError
- Defined in:
- lib/google/cloud/errors.rb
Overview
OutOfRange means 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.
Instance Method Summary collapse
-
#code ⇒ Integer
gRPC error code for OUT_OF_RANGE.
Methods inherited from Error
#body, #details, #domain, #error_info, #error_metadata, #header, #initialize, #metadata, #reason, #status_code, #status_details
Constructor Details
This class inherits a constructor from Google::Cloud::Error
Instance Method Details
#code ⇒ Integer
gRPC error code for OUT_OF_RANGE
414 415 416 |
# File 'lib/google/cloud/errors.rb', line 414 def code 11 end |