WPILibC++  unspecified
wpi::detail::type_error Class Reference

exception indicating executing a member function with a wrong type More...

#include <json.h>

Inheritance diagram for wpi::detail::type_error:
Collaboration diagram for wpi::detail::type_error:

Static Public Member Functions

static type_error create (int id, const std::string &what_arg)
 

Additional Inherited Members

- Public Member Functions inherited from wpi::detail::exception
virtual const char * what () const noexceptoverride
 returns the explanatory string
 
- Public Attributes inherited from wpi::detail::exception
const int id
 the id of the exception
 
- Protected Member Functions inherited from wpi::detail::exception
 exception (int id_, const char *what_arg)
 
- Static Protected Member Functions inherited from wpi::detail::exception
static std::string name (const std::string &ename, int id)
 

Detailed Description

exception indicating executing a member function with a wrong type

Exceptions have ids 3xx.

name / id example message description
json.exception.type_error.301 cannot create object from initializer list To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead.
json.exception.type_error.302 type must be object, but is array During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types.
json.exception.type_error.303 incompatible ReferenceType for get_ref, actual type is object To retrieve a reference to a value stored in a json object with get_ref, the type of the reference must match the value type. For instance, for a JSON array, the ReferenceType must be array_t&.
json.exception.type_error.304 cannot use at() with string The at() member functions can only be executed for certain JSON types.
json.exception.type_error.305 cannot use operator[] with string The operator[] member functions can only be executed for certain JSON types.
json.exception.type_error.306 cannot use value() with string The value() member functions can only be executed for certain JSON types.
json.exception.type_error.307 cannot use erase() with string The erase() member functions can only be executed for certain JSON types.
json.exception.type_error.308 cannot use push_back() with string The push_back() and operator+= member functions can only be executed for certain JSON types.
json.exception.type_error.309 cannot use insert() with The insert() member functions can only be executed for certain JSON types.
json.exception.type_error.310 cannot use swap() with number The swap() member functions can only be executed for certain JSON types.
json.exception.type_error.311 cannot use emplace_back() with string The emplace_back() member function can only be executed for certain JSON types.
json.exception.type_error.313 invalid value to unflatten The unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined.
json.exception.type_error.314 only objects can be unflattened The unflatten function only works for an object whose keys are JSON Pointers.
json.exception.type_error.315 values in object must be primitive The unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive.
Since
version 3.0.0

The documentation for this class was generated from the following files: