en.h
Go to the documentation of this file.
1 // Tencent is pleased to support the open source community by making RapidJSON
2 // available.
3 //
4 // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All
5 // rights reserved.
6 //
7 // Licensed under the MIT License (the "License"); you may not use this file
8 // except in compliance with the License. You may obtain a copy of the License
9 // at
10 //
11 // http://opensource.org/licenses/MIT
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 // License for the specific language governing permissions and limitations under
17 // the License.
18 
19 #ifndef RAPIDJSON_ERROR_EN_H_
20 #define RAPIDJSON_ERROR_EN_H_
21 
22 #include "error.h"
23 
24 #ifdef __clang__
25 RAPIDJSON_DIAG_PUSH
26 RAPIDJSON_DIAG_OFF(switch - enum)
27 RAPIDJSON_DIAG_OFF(covered - switch - default)
28 #endif
29 
31 
33 
41  ParseErrorCode parseErrorCode) {
42  switch (parseErrorCode) {
43  case kParseErrorNone:
44  return RAPIDJSON_ERROR_STRING("No error.");
45 
47  return RAPIDJSON_ERROR_STRING("The document is empty.");
50  "The document root must not be followed by other values.");
51 
53  return RAPIDJSON_ERROR_STRING("Invalid value.");
54 
56  return RAPIDJSON_ERROR_STRING("Missing a name for object member.");
59  "Missing a colon after a name of object member.");
62  "Missing a comma or '}' after an object member.");
63 
66  "Missing a comma or ']' after an array element.");
67 
70  "Incorrect hex digit after \\u escape in string.");
72  return RAPIDJSON_ERROR_STRING("The surrogate pair in string is invalid.");
74  return RAPIDJSON_ERROR_STRING("Invalid escape character in string.");
77  "Missing a closing quotation mark in string.");
79  return RAPIDJSON_ERROR_STRING("Invalid encoding in string.");
80 
82  return RAPIDJSON_ERROR_STRING("Number too big to be stored in double.");
84  return RAPIDJSON_ERROR_STRING("Miss fraction part in number.");
86  return RAPIDJSON_ERROR_STRING("Miss exponent in number.");
87 
89  return RAPIDJSON_ERROR_STRING("Terminate parsing due to Handler error.");
91  return RAPIDJSON_ERROR_STRING("Unspecific syntax error.");
92 
93  default:
94  return RAPIDJSON_ERROR_STRING("Unknown error.");
95  }
96 }
97 
99 
100 #ifdef __clang__
101 RAPIDJSON_DIAG_POP
102 #endif
103 
104 #endif // RAPIDJSON_ERROR_EN_H_
No error.
Definition: error.h:69
Invalid value.
Definition: error.h:75
Parsing was terminated.
Definition: error.h:102
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition: rapidjson.h:131
The document is empty.
Definition: error.h:71
Missing a name for object member.
Definition: error.h:77
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition: rapidjson.h:128
Number too big to be stored in double.
Definition: error.h:98
#define RAPIDJSON_ERROR_STRING(x)
Macro for converting string literial to RAPIDJSON_ERROR_CHARTYPE[].
Definition: error.h:56
ParseErrorCode
Error code of parsing.
Definition: error.h:68
Miss exponent in number.
Definition: error.h:100
Invalid escape character in string.
Definition: error.h:93
Invalid encoding in string.
Definition: error.h:96
#define RAPIDJSON_ERROR_CHARTYPE
Character type of error messages.
Definition: error.h:43
Miss fraction part in number.
Definition: error.h:99
Unspecific syntax error.
Definition: error.h:103
RAPIDJSON_NAMESPACE_BEGIN const RAPIDJSON_ERROR_CHARTYPE * GetParseError_En(ParseErrorCode parseErrorCode)
Maps error code of parsing into error message.
Definition: en.h:40


livox_ros_driver
Author(s): Livox Dev Team
autogenerated on Mon Mar 15 2021 02:40:46