19 #ifndef RAPIDJSON_ERROR_ERROR_H_ 20 #define RAPIDJSON_ERROR_ERROR_H_ 22 #include "../rapidjson.h" 26 RAPIDJSON_DIAG_OFF(padded)
42 #ifndef RAPIDJSON_ERROR_CHARTYPE 43 #define RAPIDJSON_ERROR_CHARTYPE char 55 #ifndef RAPIDJSON_ERROR_STRING 56 #define RAPIDJSON_ERROR_STRING(x) x 146 return code == err.
code_;
186 #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.
bool operator==(ParseErrorCode code) const
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
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.
void Clear()
Reset error code.
ParseResult(ParseErrorCode code, size_t offset)
Constructor to set an error.
friend bool operator==(ParseErrorCode code, const ParseResult &err)