DeepCover Embedded Security in IoT: Public-key Secured Data Paths

Dependencies:   MaximInterface

Embed: (wiki syntax)

« Back to documentation index

RapidJSON error handling

RapidJSON error handling

Data Structures

struct  ParseResult
 Result of parsing (wraps ParseErrorCode) More...

Typedefs

typedef const
RAPIDJSON_ERROR_CHARTYPE *(* 
GetParseErrorFunc )(ParseErrorCode)
 Function pointer type of GetParseError().

Enumerations

enum  PointerParseErrorCode {
  kPointerParseErrorNone = 0, kPointerParseErrorTokenMustBeginWithSolidus, kPointerParseErrorInvalidEscape, kPointerParseErrorInvalidPercentEncoding,
  kPointerParseErrorCharacterMustPercentEncode
}
 

Error code of parsing.

More...

Functions

RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_OFF (switch-enum) RAPIDJSON_DIAG_OFF(covered-switch-default) RAPIDJSON_NAMESPACE_BEGINinline const RAPIDJSON_ERROR_CHARTYPE *GetParseError_En(ParseErrorCode parseErrorCode)
 Maps error code of parsing into error message.

Typedef Documentation

typedef const RAPIDJSON_ERROR_CHARTYPE*(* GetParseErrorFunc)(ParseErrorCode)

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.:

    GetParseErrorFunc GetParseError = GetParseError_En; // or whatever
    const RAPIDJSON_ERROR_CHARTYPE* s = GetParseError(document.GetParseErrorCode());

Definition at line 147 of file error.h.


Enumeration Type Documentation

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.


Function Documentation

RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_OFF ( switch-  enum ) const

Maps error code of parsing into error message.

Represents an invalid index in GenericPointer::Token.

Parameters:
parseErrorCodeError 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 22 of file en.h.