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
◆ ParseResult() [1/2]
ParseResult::ParseResult |
( |
| ) |
|
|
inline |
Default constructor, no error.
◆ ParseResult() [2/2]
Constructor to set an error.
◆ Clear()
void ParseResult::Clear |
( |
| ) |
|
|
inline |
◆ Code()
◆ IsError()
bool ParseResult::IsError |
( |
| ) |
const |
|
inline |
Whether the result is an error.
◆ Offset()
size_t ParseResult::Offset |
( |
| ) |
const |
|
inline |
Get the error offset, if IsError(), 0 otherwise.
◆ operator bool()
ParseResult::operator bool |
( |
| ) |
const |
|
inline |
Conversion to bool
, returns true
, iff !IsError().
◆ operator==() [1/2]
◆ operator==() [2/2]
◆ Set()
Update error code and offset.
◆ operator==
◆ code_
◆ offset_
size_t ParseResult::offset_ |
|
private |
The documentation for this struct was generated from the following file:
- deps/discord-rpc/thirdparty/rapidjson-1.1.0/include/rapidjson/error/error.h