"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/rapidjson/error/en.h" between
rapidjson-1.0.2.tar.gz and rapidjson-1.1.0.tar.gz

About: RapidJSON is a fast JSON parser/generator for C++ with both SAX/DOM style API.

en.h  (rapidjson-1.0.2):en.h  (rapidjson-1.1.0)
skipping to change at line 15 skipping to change at line 15
// Licensed under the MIT License (the "License"); you may not use this file exc ept // Licensed under the MIT License (the "License"); you may not use this file exc ept
// in compliance with the License. You may obtain a copy of the License at // in compliance with the License. You may obtain a copy of the License at
// //
// http://opensource.org/licenses/MIT // http://opensource.org/licenses/MIT
// //
// Unless required by applicable law or agreed to in writing, software distribut ed // Unless required by applicable law or agreed to in writing, software distribut ed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
#ifndef RAPIDJSON_ERROR_EN_H__ #ifndef RAPIDJSON_ERROR_EN_H_
#define RAPIDJSON_ERROR_EN_H__ #define RAPIDJSON_ERROR_EN_H_
#include "error.h" #include "error.h"
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(switch-enum)
RAPIDJSON_DIAG_OFF(covered-switch-default)
#endif
RAPIDJSON_NAMESPACE_BEGIN RAPIDJSON_NAMESPACE_BEGIN
//! Maps error code of parsing into error message. //! Maps error code of parsing into error message.
/*! /*!
\ingroup RAPIDJSON_ERRORS \ingroup RAPIDJSON_ERRORS
\param parseErrorCode Error code obtained in parsing. \param parseErrorCode Error code obtained in parsing.
\return the error message. \return the error message.
\note User can make a copy of this function for localization. \note User can make a copy of this function for localization.
Using switch-case is safer for future modification of error codes. Using switch-case is safer for future modification of error codes.
*/ */
inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErro rCode) { inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErro rCode) {
switch (parseErrorCode) { switch (parseErrorCode) {
case kParseErrorNone: return RAPIDJSON_ERROR_S TRING("No error."); case kParseErrorNone: return RAPIDJSON_ERROR_S TRING("No error.");
case kParseErrorDocumentEmpty: return RAPIDJSON_ERROR_S TRING("The document is empty."); case kParseErrorDocumentEmpty: return RAPIDJSON_ERROR_S TRING("The document is empty.");
case kParseErrorDocumentRootNotSingular: return RAPIDJSON_ERROR_S TRING("The document root must not follow by other values."); case kParseErrorDocumentRootNotSingular: return RAPIDJSON_ERROR_S TRING("The document root must not be followed by other values.");
case kParseErrorValueInvalid: return RAPIDJSON_ERROR_S TRING("Invalid value."); case kParseErrorValueInvalid: return RAPIDJSON_ERROR_S TRING("Invalid value.");
case kParseErrorObjectMissName: return RAPIDJSON_ERROR_S TRING("Missing a name for object member."); case kParseErrorObjectMissName: return RAPIDJSON_ERROR_S TRING("Missing a name for object member.");
case kParseErrorObjectMissColon: return RAPIDJSON_ERROR_S TRING("Missing a colon after a name of object member."); case kParseErrorObjectMissColon: return RAPIDJSON_ERROR_S TRING("Missing a colon after a name of object member.");
case kParseErrorObjectMissCommaOrCurlyBracket: return RAPIDJSON_ERROR_S TRING("Missing a comma or '}' after an object member."); case kParseErrorObjectMissCommaOrCurlyBracket: return RAPIDJSON_ERROR_S TRING("Missing a comma or '}' after an object member.");
case kParseErrorArrayMissCommaOrSquareBracket: return RAPIDJSON_ERROR_S TRING("Missing a comma or ']' after an array element."); case kParseErrorArrayMissCommaOrSquareBracket: return RAPIDJSON_ERROR_S TRING("Missing a comma or ']' after an array element.");
case kParseErrorStringUnicodeEscapeInvalidHex: return RAPIDJSON_ERROR_S TRING("Incorrect hex digit after \\u escape in string."); case kParseErrorStringUnicodeEscapeInvalidHex: return RAPIDJSON_ERROR_S TRING("Incorrect hex digit after \\u escape in string.");
skipping to change at line 58 skipping to change at line 64
case kParseErrorStringMissQuotationMark: return RAPIDJSON_ERROR_S TRING("Missing a closing quotation mark in string."); case kParseErrorStringMissQuotationMark: return RAPIDJSON_ERROR_S TRING("Missing a closing quotation mark in string.");
case kParseErrorStringInvalidEncoding: return RAPIDJSON_ERROR_S TRING("Invalid encoding in string."); case kParseErrorStringInvalidEncoding: return RAPIDJSON_ERROR_S TRING("Invalid encoding in string.");
case kParseErrorNumberTooBig: return RAPIDJSON_ERROR_S TRING("Number too big to be stored in double."); case kParseErrorNumberTooBig: return RAPIDJSON_ERROR_S TRING("Number too big to be stored in double.");
case kParseErrorNumberMissFraction: return RAPIDJSON_ERROR_S TRING("Miss fraction part in number."); case kParseErrorNumberMissFraction: return RAPIDJSON_ERROR_S TRING("Miss fraction part in number.");
case kParseErrorNumberMissExponent: return RAPIDJSON_ERROR_S TRING("Miss exponent in number."); case kParseErrorNumberMissExponent: return RAPIDJSON_ERROR_S TRING("Miss exponent in number.");
case kParseErrorTermination: return RAPIDJSON_ERROR_S TRING("Terminate parsing due to Handler error."); case kParseErrorTermination: return RAPIDJSON_ERROR_S TRING("Terminate parsing due to Handler error.");
case kParseErrorUnspecificSyntaxError: return RAPIDJSON_ERROR_S TRING("Unspecific syntax error."); case kParseErrorUnspecificSyntaxError: return RAPIDJSON_ERROR_S TRING("Unspecific syntax error.");
default: default: return RAPIDJSON_ERROR_S
return RAPIDJSON_ERROR_STRING("Unknown error."); TRING("Unknown error.");
} }
} }
RAPIDJSON_NAMESPACE_END RAPIDJSON_NAMESPACE_END
#endif // RAPIDJSON_ERROR_EN_H__ #ifdef __clang__
RAPIDJSON_DIAG_POP
#endif
#endif // RAPIDJSON_ERROR_EN_H_
 End of changes. 5 change blocks. 
5 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)