-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide error code in addition to text message #23
Comments
I like the overall approach taken in the issue23errorcode branch. It's simple and effective. Somewhat on-topic here as well (because it touches the same code parts), but rather more related to #22, I would prefer to keep a clean way to continue replacing RAPIDJSON_PARSE_ERROR with exception throwing code (as we currently use it locally). This use model is a bit more complicated now and adds unnecessary return paths, which will be dead code in case of exceptions. We can open a new issue and provide a "standard way" to optionally use exceptions after resolving this issue. |
Oh, and I should have mentioned that the issue23errorcode branch is affected by #26 as well. |
I think supporting exception is possible. The dead code ("early return check") can be disabled by preprocessing. |
https://code.google.com/p/rapidjson/issues/detail?id=79
As mentioned by Anton.Breusov, currently the parsing error is provided as text string, which cannot be identified by code easily, and incurs difficulty in localization.
Provide error code.
User can obtain error message provided by rapidjson but can also localize the message by themselves.
The text was updated successfully, but these errors were encountered: