1# basic_json::invalid_iterator 2 3```cpp 4class invalid_iterator : public exception; 5``` 6 7This exception is thrown if iterators passed to a library function do not match the expected semantics. 8 9Exceptions have ids 2xx. 10 11```plantuml 12std::exception <|-- basic_json::exception 13basic_json::exception <|-- basic_json::parse_error 14basic_json::exception <|-- basic_json::invalid_iterator 15basic_json::exception <|-- basic_json::type_error 16basic_json::exception <|-- basic_json::out_of_range 17basic_json::exception <|-- basic_json::other_error 18 19interface std::exception {} 20 21class basic_json::exception { 22 + const int id 23 + const char* what() const 24} 25 26class basic_json::parse_error { 27 + const std::size_t byte 28} 29 30class basic_json::invalid_iterator #FFFF00 {} 31``` 32 33## Member functions 34 35- **what** - returns explanatory string 36 37## Member variables 38 39- **id** - the id of the exception 40 41## Example 42 43??? example 44 45 The following code shows how a `invalid_iterator` exception can be caught. 46 47 ```cpp 48 --8<-- "examples/invalid_iterator.cpp" 49 ``` 50 51 Output: 52 53 ```json 54 --8<-- "examples/invalid_iterator.output" 55 ``` 56 57## Version history 58 59- Since version 3.0.0. 60