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 150 return code_ == code;
154 return code == err.
code_;
159 return !(*
this == that);
163 return !(*
this == code);
205 #endif // RAPIDJSON_ERROR_ERROR_H_ bool operator!=(ParseErrorCode code) const
friend bool operator!=(ParseErrorCode code, const ParseResult &err)
size_t Offset() const
Get the error offset, if IsError(), 0 otherwise.
Missing a comma or '}' after an object member.
bool operator==(ParseErrorCode code) const
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Missing a comma or ']' after an array element.
bool operator==(const ParseResult &that) const
bool operator!=(const ParseResult &that) const
Missing a name for object member.
Result of parsing (wraps ParseErrorCode)
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Number too big to be stored in double.
void Set(ParseErrorCode code, size_t offset=0)
Update error code and offset.
ParseErrorCode
Error code of parsing.
ParseErrorCode Code() const
Get the error code.
bool(ParseResult::* BooleanType)() const
! Unspecified boolean type
Invalid escape character in string.
Invalid encoding in string.
bool IsError() const
Whether the result is an error.
ParseResult()
Default constructor, no error.
#define RAPIDJSON_ERROR_CHARTYPE
Character type of error messages.
Miss fraction part in number.
Incorrect hex digit after \u escape in string.
void Clear()
Reset error code.
The surrogate pair in string is invalid.
Missing a colon after a name of object member.
Missing a closing quotation mark in string.
ParseResult(ParseErrorCode code, size_t offset)
Constructor to set an error.
The document root must not follow by other values.
friend bool operator==(ParseErrorCode code, const ParseResult &err)