15 #ifndef RAPIDJSON_ERROR_ERROR_H_ 16 #define RAPIDJSON_ERROR_ERROR_H_ 18 #include "../rapidjson.h" 22 RAPIDJSON_DIAG_OFF(padded)
38 #ifndef RAPIDJSON_ERROR_CHARTYPE 39 #define RAPIDJSON_ERROR_CHARTYPE char 51 #ifndef RAPIDJSON_ERROR_STRING 52 #define RAPIDJSON_ERROR_STRING(x) x 118 size_t Offset()
const {
return offset_; }
161 #endif // RAPIDJSON_ERROR_ERROR_H_ Miss fraction part in number.
ParseResult()
Default constructor, no error.
void Clear()
Reset error code.
ParseErrorCode Code() const
Get the error code.
Missing a colon after a name of object member.
Missing a comma or ']' after an array element.
Missing a closing quotation mark in string.
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
bool operator!=(const ParseResult &that) const
ParseErrorCode
Error code of parsing.
Incorrect hex digit after \u escape in string.
Missing a name for object member.
bool operator!=(ParseErrorCode code) const
Number too big to be stored in double.
#define RAPIDJSON_ERROR_CHARTYPE
Character type of error messages.
friend bool operator==(ParseErrorCode code, const ParseResult &err)
Invalid encoding in string.
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Missing a comma or '}' after an object member.
friend bool operator!=(ParseErrorCode code, const ParseResult &err)
ParseResult(ParseErrorCode code, size_t offset)
Constructor to set an error.
bool IsError() const
Whether the result is an error.
bool(ParseResult::* BooleanType)() const
! Unspecified boolean type
Invalid escape character in string.
void Set(ParseErrorCode code, size_t offset=0)
Update error code and offset.
bool operator==(ParseErrorCode code) const
The document root must not follow by other values.
bool operator==(const ParseResult &that) const
Result of parsing (wraps ParseErrorCode)
The surrogate pair in string is invalid.
size_t Offset() const
Get the error offset, if IsError(), 0 otherwise.