Result of parsing (wraps ParseErrorCode)
More...
#include <error.h>
|
typedef bool(ParseResult::*) | BooleanType() const |
| ! Unspecified boolean type
|
|
if (!ok) {
fprintf(stderr, "JSON parse error: %s (%u)",
exit(EXIT_FAILURE);
}
GenericDocument & Parse(const typename SourceEncoding::Ch *str)
Parse JSON text from a read-only string (with Encoding conversion)
RAPIDJSON_NAMESPACE_BEGIN const RAPIDJSON_ERROR_CHARTYPE * GetParseError_En(ParseErrorCode parseErrorCode)
Maps error code of parsing into error message.
Result of parsing (wraps ParseErrorCode)
- See also
- GenericReader::Parse, GenericDocument::Parse
Definition at line 106 of file error.h.
◆ BooleanType
bool(ParseResult::*) ParseResult::BooleanType() const |
◆ ParseResult() [1/2]
ParseResult::ParseResult |
( |
| ) |
|
|
inline |
Definition at line 111 of file error.h.
@ kParseErrorNone
No error.
◆ ParseResult() [2/2]
Definition at line 113 of file error.h.
113: code_(code), offset_(offset) {}
◆ Clear()
void ParseResult::Clear |
( |
| ) |
|
|
inline |
Definition at line 134 of file error.h.
void Set(ParseErrorCode code, size_t offset=0)
Update error code and offset.
◆ Code()
◆ IsError()
bool ParseResult::IsError |
( |
| ) |
const |
|
inline |
◆ Offset()
size_t ParseResult::Offset |
( |
| ) |
const |
|
inline |
◆ operator BooleanType()
Definition at line 121 of file error.h.
bool IsError() const
Whether the result is an error.
◆ operator!=() [1/2]
bool ParseResult::operator!= |
( |
const ParseResult & | that | ) |
const |
|
inline |
Definition at line 129 of file error.h.
129{ return !(*this == that); }
◆ operator!=() [2/2]
Definition at line 130 of file error.h.
130{ return !(*this == code); }
◆ operator==() [1/2]
bool ParseResult::operator== |
( |
const ParseResult & | that | ) |
const |
|
inline |
Definition at line 125 of file error.h.
125{ return code_ == that.code_; }
◆ operator==() [2/2]
Definition at line 126 of file error.h.
126{ return code_ == code; }
◆ Set()
Definition at line 136 of file error.h.
136{ code_ = code; offset_ = offset; }
◆ operator!=
Definition at line 131 of file error.h.
131{ return err != code; }
◆ operator==
Definition at line 127 of file error.h.
127{ return code == err.code_; }
The documentation for this struct was generated from the following file:
- libraries/fc/include/fc/crypto/webauthn_json/include/rapidjson/error/error.h