Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
692904b7
Commit
692904b7
authored
Jul 10, 2014
by
thebusytypist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle all unspecific parsing errors.
parent
f6235b21
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
en.h
include/rapidjson/error/en.h
+2
-0
reader.h
include/rapidjson/reader.h
+6
-1
No files found.
include/rapidjson/error/en.h
View file @
692904b7
...
...
@@ -38,6 +38,8 @@ inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErro
case
kParseErrorNumberMissFraction
:
return
RAPIDJSON_ERROR_STRING
(
"Miss fraction part in number."
);
case
kParseErrorNumberMissExponent
:
return
RAPIDJSON_ERROR_STRING
(
"Miss exponent in number."
);
case
kParseErrorUnspecificSyntaxError
:
return
RAPIDJSON_ERROR_STRING
(
"Unspecific syntax error."
);
default
:
return
RAPIDJSON_ERROR_STRING
(
"Unknown error."
);
}
...
...
include/rapidjson/reader.h
View file @
692904b7
...
...
@@ -74,7 +74,9 @@ enum ParseErrorCode {
kParseErrorNumberTooBig
,
//!< Number too big to be stored in double.
kParseErrorNumberMissFraction
,
//!< Miss fraction part in number.
kParseErrorNumberMissExponent
//!< Miss exponent in number.
kParseErrorNumberMissExponent
,
//!< Miss exponent in number.
kParseErrorUnspecificSyntaxError
//!< General syntax error.
};
///////////////////////////////////////////////////////////////////////////////
...
...
@@ -1114,6 +1116,9 @@ private:
else
if
(
src
==
IterativeParsingElementState
)
RAPIDJSON_PARSE_ERROR
(
kParseErrorArrayMissCommaOrSquareBracket
,
is
.
Tell
());
else
RAPIDJSON_PARSE_ERROR
(
kParseErrorUnspecificSyntaxError
,
is
.
Tell
());
}
template
<
unsigned
parseFlags
,
typename
InputStream
,
typename
Handler
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment