📝 update documentation
This commit is contained in:
parent
d00ad33e46
commit
7b7da08fb6
@ -16,7 +16,7 @@ See [Switch off exceptions](../home/exceptions.md#switch-off-exceptions) for an
|
|||||||
|
|
||||||
This macro enables extended diagnostics for exception messages. Possible values are `1` to enable or `0` to disable (default).
|
This macro enables extended diagnostics for exception messages. Possible values are `1` to enable or `0` to disable (default).
|
||||||
|
|
||||||
When enabled, exception messages contain a [JSON Pointer](json_pointer.md) to the JSON value that triggered the exception, see [Extended diagnostic messages](../home/exceptions.md#extended-diagnostic-messages) for an example.
|
When enabled, exception messages contain a [JSON Pointer](json_pointer.md) to the JSON value that triggered the exception, see [Extended diagnostic messages](../home/exceptions.md#extended-diagnostic-messages) for an example. Note that enabling this macro increases the size of every JSON value by one pointer and adds some runtime overhead.
|
||||||
|
|
||||||
The diagnostics messages can also be controlled with the CMake option `JSON_Diagnostics` (`OFF` by default) which sets `JSON_DIAGNOSTICS` accordingly.
|
The diagnostics messages can also be controlled with the CMake option `JSON_Diagnostics` (`OFF` by default) which sets `JSON_DIAGNOSTICS` accordingly.
|
||||||
|
|
||||||
|
@ -52,8 +52,7 @@ Note that `JSON_THROW_USER` should leave the current scope (e.g., by throwing or
|
|||||||
|
|
||||||
### Extended diagnostic messages
|
### Extended diagnostic messages
|
||||||
|
|
||||||
Exceptions in the library are thrown in the local context of the JSON value they are detected. This makes detailed
|
Exceptions in the library are thrown in the local context of the JSON value they are detected. This makes detailed diagnostics messages, and hence debugging, difficult.
|
||||||
diagnostics messages, and hence debugging, difficult.
|
|
||||||
|
|
||||||
??? example
|
??? example
|
||||||
|
|
||||||
@ -88,7 +87,6 @@ As this global context comes at the price of storing one additional pointer per
|
|||||||
Now the exception message contains a JSON Pointer `/address/housenumber` that indicates which value has the wrong type.
|
Now the exception message contains a JSON Pointer `/address/housenumber` that indicates which value has the wrong type.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Parse errors
|
## Parse errors
|
||||||
|
|
||||||
This exception is thrown by the library when a parse error occurs. Parse errors
|
This exception is thrown by the library when a parse error occurs. Parse errors
|
||||||
|
Loading…
Reference in New Issue
Block a user