WPILibC++ 2023.4.3-108-ge5452e3
|
exception indicating access out of the defined range More...
#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/json/include/wpi/json.h>
Static Public Member Functions | |
static out_of_range | create (int id_, std::string_view what_arg) |
Additional Inherited Members | |
Public Member Functions inherited from wpi::detail::exception | |
const char * | what () const noexcept override |
returns the explanatory string More... | |
Public Attributes inherited from wpi::detail::exception | |
const int | id |
the id of the exception More... | |
Protected Member Functions inherited from wpi::detail::exception | |
exception (int id_, std::string_view what_arg) | |
exception indicating access out of the defined range
This exception is thrown in case a library function is called on an input parameter that exceeds the expected range, for instance in case of array indices or nonexisting object keys.
Exceptions have ids 4xx.
name / id | example message | description |
---|---|---|
json.exception.out_of_range.401 | array index 3 is out of range | The provided array index i is larger than size-1. |
json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index - in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. |
json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. |
json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. |
json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. |
json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. |
json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON only supports integers numbers up to 9223372036854775807. |
json.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following # ) of an UBJSON array or object exceeds the maximal capacity. |
@liveexample{The following code shows how an out_of_range
exception can be caught.,out_of_range}
|
static |