mirror of
https://github.com/nlohmann/json.git
synced 2026-02-22 11:26:25 +00:00
Overwork documentation (#4516)
This commit is contained in:
@@ -8,24 +8,36 @@ This class is an extension of [`std::exception`](https://en.cppreference.com/w/c
|
||||
member `id` for exception ids. It is used as the base class for all exceptions thrown by the `basic_json` class. This
|
||||
class can hence be used as "wildcard" to catch exceptions, see example below.
|
||||
|
||||
```plantuml
|
||||
std::exception <|-- basic_json::exception
|
||||
basic_json::exception <|-- basic_json::parse_error
|
||||
basic_json::exception <|-- basic_json::invalid_iterator
|
||||
basic_json::exception <|-- basic_json::type_error
|
||||
basic_json::exception <|-- basic_json::out_of_range
|
||||
basic_json::exception <|-- basic_json::other_error
|
||||
```mermaid
|
||||
classDiagram
|
||||
direction LR
|
||||
|
||||
class std_exception ["std::exception"] {
|
||||
<<interface>>
|
||||
}
|
||||
|
||||
interface std::exception {}
|
||||
class json_exception ["basic_json::exception"] {
|
||||
+const int id
|
||||
+const char* what() const
|
||||
}
|
||||
|
||||
class json_parse_error ["basic_json::parse_error"] {
|
||||
+const std::size_t byte
|
||||
}
|
||||
|
||||
class basic_json::exception #FFFF00 {
|
||||
+ const int id
|
||||
+ const char* what() const
|
||||
}
|
||||
class json_invalid_iterator ["basic_json::invalid_iterator"]
|
||||
class json_type_error ["basic_json::type_error"]
|
||||
class json_out_of_range ["basic_json::out_of_range"]
|
||||
class json_other_error ["basic_json::other_error"]
|
||||
|
||||
class basic_json::parse_error {
|
||||
+ const std::size_t byte
|
||||
}
|
||||
std_exception <|-- json_exception
|
||||
json_exception <|-- json_parse_error
|
||||
json_exception <|-- json_invalid_iterator
|
||||
json_exception <|-- json_type_error
|
||||
json_exception <|-- json_out_of_range
|
||||
json_exception <|-- json_other_error
|
||||
|
||||
style json_exception fill:#CCCCFF
|
||||
```
|
||||
|
||||
Subclasses:
|
||||
|
||||
Reference in New Issue
Block a user