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::ParseResult |
( |
| ) |
|
|
inline |
Default constructor, no error.
No error.
Definition: error.h:60
ParseErrorCode code_
Definition: error.h:128
size_t offset_
Definition: error.h:129
Constructor to set an error.
ParseErrorCode code_
Definition: error.h:128
Definition: inftrees.h:24
size_t offset_
Definition: error.h:129
void ParseResult::Clear |
( |
| ) |
|
|
inline |
Reset error code.
No error.
Definition: error.h:60
void Set(ParseErrorCode code, size_t offset=0)
Update error code and offset.
Definition: error.h:125
Get the error code.
ParseErrorCode code_
Definition: error.h:128
bool ParseResult::IsError |
( |
| ) |
const |
|
inline |
Whether the result is an error.
No error.
Definition: error.h:60
ParseErrorCode code_
Definition: error.h:128
size_t ParseResult::Offset |
( |
| ) |
const |
|
inline |
Get the error offset, if IsError(), 0 otherwise.
size_t offset_
Definition: error.h:129
ParseResult::operator bool |
( |
| ) |
const |
|
inline |
Conversion to bool
, returns true
, iff !IsError().
bool IsError() const
Whether the result is an error.
Definition: error.h:116
ParseErrorCode code_
Definition: error.h:128
ParseErrorCode code_
Definition: error.h:128
Definition: inftrees.h:24
Update error code and offset.
ParseErrorCode code_
Definition: error.h:128
Definition: inftrees.h:24
size_t offset_
Definition: error.h:129
ParseErrorCode code_
Definition: error.h:128
Definition: inftrees.h:24
size_t ParseResult::offset_ |
|
private |
The documentation for this struct was generated from the following file:
- dep/rapidjson/rapidjson/error/error.h