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);
}
A document for parsing JSON text as DOM.
Definition: document.h:3143
GenericDocument & Parse(const typename SourceEncoding::Ch *str)
Parse JSON text from a read-only string (with Encoding conversion)
Definition: document.h:3377
RAPIDJSON_NAMESPACE_BEGIN const RAPIDJSON_ERROR_CHARTYPE * GetParseError_En(ParseErrorCode parseErrorCode)
Maps error code of parsing into error message.
Definition: en.h:36
Result of parsing (wraps ParseErrorCode)
Definition: error.h:108
ParseErrorCode Code() const
Get the error code.
Definition: error.h:119
size_t Offset() const
Get the error offset, if IsError(), 0 otherwise.
Definition: error.h:121
- See also
- GenericReader::Parse, GenericDocument::Parse
◆ BooleanType
| typedef bool(ParseResult::* ParseResult::BooleanType) () const |
! Unspecified boolean type
◆ 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 BooleanType()
Explicit conversion to bool, returns true, iff !IsError().
◆ operator!=() [1/2]
| bool ParseResult::operator!= |
( |
const ParseResult & |
that | ) |
const |
|
inline |
◆ operator!=() [2/2]
◆ operator==() [1/2]
| bool ParseResult::operator== |
( |
const ParseResult & |
that | ) |
const |
|
inline |
◆ operator==() [2/2]
◆ Set()
Update error code and offset.
◆ operator!=
◆ operator==
The documentation for this struct was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/rapidjson/error/error.h