Result of parsing (wraps ParseErrorCode)
More...
#include <error.h>
Result of parsing (wraps ParseErrorCode)
if (!ok) {
fprintf(stderr, "JSON parse error: %s (%u)",
exit(EXIT_FAILURE);
}
- See also
- GenericReader::Parse, GenericDocument::Parse
Definition at line 106 of file error.h.
◆ ParseResult() [1/2]
ParseResult::ParseResult |
( |
| ) |
|
|
inline |
Default constructor, no error.
Definition at line 109 of file error.h.
◆ ParseResult() [2/2]
Constructor to set an error.
Definition at line 111 of file error.h.
◆ Clear()
void ParseResult::Clear |
( |
| ) |
|
|
inline |
Reset error code.
Definition at line 128 of file error.h.
◆ Code()
Get the error code.
Definition at line 114 of file error.h.
◆ IsError()
bool ParseResult::IsError |
( |
| ) |
const |
|
inline |
Whether the result is an error.
Definition at line 121 of file error.h.
◆ Offset()
size_t ParseResult::Offset |
( |
| ) |
const |
|
inline |
◆ operator bool()
ParseResult::operator bool |
( |
| ) |
const |
|
inline |
◆ operator==() [1/2]
bool ParseResult::operator== |
( |
const ParseResult & |
that | ) |
const |
|
inline |
◆ operator==() [2/2]
◆ Set()
Update error code and offset.
Definition at line 130 of file error.h.
◆ operator==
The documentation for this struct was generated from the following file:
- /home/runner/work/cphot/cphot/include/rapidjson/error/error.h