## `error`

Error codes returned by JSON operations.

### Synopsis

Defined in header <boost/json/error.hpp>.

    enum class error;

### Values

Name | Description
--- | ---
`syntax` | syntax error
`extra_data` | extra data
`incomplete` | incomplete JSON
`exponent_overflow` | exponent too large
`too_deep` | too deep
`illegal_leading_surrogate` | illegal leading surrogate
`illegal_trailing_surrogate` | illegal trailing surrogate
`expected_hex_digit` | expected hex digit
`expected_utf16_escape` | expected utf16 escape
`object_too_large` | An object contains too many elements.
`array_too_large` | An array contains too many elements.
`key_too_large` | A key is too large.
`string_too_large` | A string is too large.
`number_too_large` | A number is too large.
`input_error` | error occured when trying to read input
`exception` | An exception was thrown during operation.
`out_of_range` | A requested element is outside of container’s range.
`test_failure` | test failure
`missing_slash` | missing slash character before token reference
`invalid_escape` | invalid escape sequence
`token_not_number` | token should be a number but cannot be parsed as such
`value_is_scalar` | current value is neither an object nor an array
`not_found` | current value does not contain referenced value
`token_overflow` | token cannot be represented by std::size_t
`past_the_end` | past-the-end index is not supported
`not_number` | JSON number was expected during conversion.
`not_exact` | number cast is not exact
`not_null` | JSON null was expected during conversion.
`not_bool` | JSON bool was expected during conversion.
`not_array` | JSON array was expected during conversion.
`not_object` | JSON object was expected during conversion.
`not_string` | JSON string was expected during conversion.
`not_int64` | std::int64_t was expected during conversion
`not_uint64` | std::uint64_t was expected during conversion
`not_double` | `double` was expected during conversion
`not_integer` | JSON integer was expected during conversion.
`size_mismatch` | source composite has size incompatible with target
`exhausted_variants` | none of the possible conversions were successful
`unknown_name` | the key does not correspond to a known name

Convenience header <boost/json.hpp>.

Edit this page