A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/group__RAPIDJSON__ERRORS.html below:

NCBI C++ ToolKit: RapidJSON error handling

enum   rapidjson::ParseErrorCode {
  rapidjson::kParseErrorNone = 0 , rapidjson::kParseErrorDocumentEmpty , rapidjson::kParseErrorDocumentRootNotSingular , rapidjson::kParseErrorValueInvalid ,
  rapidjson::kParseErrorObjectMissName , rapidjson::kParseErrorObjectMissColon , rapidjson::kParseErrorObjectMissCommaOrCurlyBracket , rapidjson::kParseErrorArrayMissCommaOrSquareBracket ,
  rapidjson::kParseErrorStringUnicodeEscapeInvalidHex , rapidjson::kParseErrorStringUnicodeSurrogateInvalid , rapidjson::kParseErrorStringEscapeInvalid , rapidjson::kParseErrorStringMissQuotationMark ,
  rapidjson::kParseErrorStringInvalidEncoding , rapidjson::kParseErrorNumberTooBig , rapidjson::kParseErrorNumberMissFraction , rapidjson::kParseErrorNumberMissExponent ,
  rapidjson::kParseErrorTermination , rapidjson::kParseErrorUnspecificSyntaxError
}   Error code of parsing. More...
  enum   rapidjson::PointerParseErrorCode {
  rapidjson::kPointerParseErrorNone = 0 , rapidjson::kPointerParseErrorTokenMustBeginWithSolidus , rapidjson::kPointerParseErrorInvalidEscape , rapidjson::kPointerParseErrorInvalidPercentEncoding ,
  rapidjson::kPointerParseErrorCharacterMustPercentEncode
}   Error code of parsing. More...
  ◆ RAPIDJSON_ERROR_CHARTYPE #define RAPIDJSON_ERROR_CHARTYPE   char

Character type of error messages.

The default character type is char. On Windows, user can define this macro as TCHAR for supporting both unicode/non-unicode settings.

Definition at line 39 of file error.h.

◆ RAPIDJSON_ERROR_STRING #define RAPIDJSON_ERROR_STRING (   x )    x

Macro for converting string literial to RAPIDJSON_ERROR_CHARTYPE[].

By default this conversion macro does nothing. On Windows, user can define this macro as _T(x) for supporting both unicode/non-unicode settings.

Definition at line 52 of file error.h.

◆ RAPIDJSON_PARSE_ERROR #define RAPIDJSON_PARSE_ERROR (   parseErrorCode,   offset  )

(Internal) macro to indicate and handle a parse error.

Parameters

Invokes RAPIDJSON_PARSE_ERROR_NORETURN and stops the parsing.

See also
RAPIDJSON_PARSE_ERROR_NORETURN

Definition at line 118 of file reader.h.

◆ RAPIDJSON_PARSE_ERROR_NORETURN #define RAPIDJSON_PARSE_ERROR_NORETURN (   parseErrorCode,   offset  ) Value:

SetParseError(parseErrorCode,

offset

); \

RAPIDJSON_MULTILINEMACRO_END

#define RAPIDJSON_ASSERT(x)

Assertion.

Macro to indicate a parse error.

Parameters

This macros can be used as a customization point for the internal error handling mechanism of RapidJSON.

A common usage model is to throw an exception instead of requiring the caller to explicitly check the rapidjson::GenericReader::Parse's return value:

#define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode,offset) \

throw ParseException(parseErrorCode, #parseErrorCode, offset)

#include <stdexcept>

#include "rapidjson/error/error.h"

};

#include "rapidjson/reader.h"

ParseErrorCode

Error code of parsing.

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

Result of parsing (wraps ParseErrorCode)

See also
RAPIDJSON_PARSE_ERROR, rapidjson::GenericReader::Parse

Definition at line 99 of file reader.h.

◆ GetParseErrorFunc

Function pointer type of GetParseError().

This is the prototype for GetParseError_X(), where X is a locale. User can dynamically change locale in runtime, e.g.:

#define RAPIDJSON_ERROR_CHARTYPE

Character type of error messages.

const char * GetParseError_En(ParseErrorCode parseErrorCode)

Maps error code of parsing into error message.

const char *(* GetParseErrorFunc)(ParseErrorCode)

Function pointer type of GetParseError().

Definition at line 147 of file error.h.

◆ ParseErrorCode

Error code of parsing.

See also
GenericReader::Parse, GenericReader::GetParseErrorCode
Enumerator kParseErrorNone 

No error.

kParseErrorDocumentEmpty 

The document is empty.

kParseErrorDocumentRootNotSingular 

The document root must not follow by other values.

kParseErrorValueInvalid 

Invalid value.

kParseErrorObjectMissName 

Missing a name for object member.

kParseErrorObjectMissColon 

Missing a colon after a name of object member.

kParseErrorObjectMissCommaOrCurlyBracket 

Missing a comma or '}' after an object member.

kParseErrorArrayMissCommaOrSquareBracket 

Missing a comma or ']' after an array element.

kParseErrorStringUnicodeEscapeInvalidHex 

Incorrect hex digit after \u escape in string.

kParseErrorStringUnicodeSurrogateInvalid 

The surrogate pair in string is invalid.

kParseErrorStringEscapeInvalid 

Invalid escape character in string.

kParseErrorStringMissQuotationMark 

Missing a closing quotation mark in string.

kParseErrorStringInvalidEncoding 

Invalid encoding in string.

kParseErrorNumberTooBig 

Number too big to be stored in double.

kParseErrorNumberMissFraction 

Miss fraction part in number.

kParseErrorNumberMissExponent 

Miss exponent in number.

kParseErrorTermination 

Parsing was terminated.

kParseErrorUnspecificSyntaxError 

Unspecific syntax error.

Definition at line 64 of file error.h.

◆ PointerParseErrorCode

Error code of parsing.

See also
GenericPointer::GenericPointer, GenericPointer::GetParseErrorCode
Enumerator kPointerParseErrorNone 

The parse is successful.

kPointerParseErrorTokenMustBeginWithSolidus 

A token must begin with a '/'.

kPointerParseErrorInvalidEscape 

Invalid escape.

kPointerParseErrorInvalidPercentEncoding 

Invalid percent encoding in URI fragment.

kPointerParseErrorCharacterMustPercentEncode 

A character must percent encoded in URI fragment.

Definition at line 39 of file pointer.h.

◆ GetParseError_En()

Maps error code of parsing into error message.

Parameters
parseErrorCode Error code obtained in parsing.
Returns
the error message.
Note
User can make a copy of this function for localization. Using switch-case is safer for future modification of error codes.

Definition at line 36 of file en.h.

References rapidjson::kParseErrorArrayMissCommaOrSquareBracket, rapidjson::kParseErrorDocumentEmpty, rapidjson::kParseErrorDocumentRootNotSingular, rapidjson::kParseErrorNone, rapidjson::kParseErrorNumberMissExponent, rapidjson::kParseErrorNumberMissFraction, rapidjson::kParseErrorNumberTooBig, rapidjson::kParseErrorObjectMissColon, rapidjson::kParseErrorObjectMissCommaOrCurlyBracket, rapidjson::kParseErrorObjectMissName, rapidjson::kParseErrorStringEscapeInvalid, rapidjson::kParseErrorStringInvalidEncoding, rapidjson::kParseErrorStringMissQuotationMark, rapidjson::kParseErrorStringUnicodeEscapeInvalidHex, rapidjson::kParseErrorStringUnicodeSurrogateInvalid, rapidjson::kParseErrorTermination, rapidjson::kParseErrorUnspecificSyntaxError, rapidjson::kParseErrorValueInvalid, and RAPIDJSON_ERROR_STRING.

Referenced by CSatInfoServiceParser::GetConnectionString(), and CJson_Document::GetReadError().


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4