Comments (3)
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.
from rapidjson.
Oh, and I should have mentioned that the issue23errorcode branch is affected by #26 as well.
from rapidjson.
I think supporting exception is possible. The dead code ("early return check") can be disabled by preprocessing.
But I don't think exception is really needed. The downside of it is performance overhead and unwinding code overhead.
Can you think of some reasons for supporting it?
If user just want to use try/catch syntax instead of calling GetParseErrorCode(), we can just throw an exception at Parse() function.
from rapidjson.
Related Issues (20)
- New release tag version HOT 1
- `qt5-location` fails to build when devel version of `rapidjson` installed (?)
- Visual Studio 2022 (using /std:c++20) new warning HOT 2
- Throw exception in functions which is specified as noexcept
- 在多进程中使用共享内存传输rapidjson时出现数据读取错误的问题
- 源码请教
- Cmake 3.5 deprecation warning HOT 1
- Build fails on macOS due to Include/rapidjson/msinttypes/stdint.h HOT 2
- Writer always prints decimals when a float or double is used
- Error:/rapidjson/document.h:2334:15: error: expected unqualified-id before ‘bool’ HOT 4
- New version for googletest HOT 1
- reuse the json object, only revise some keywords, best formance for generate a json string?
- performace comparison between snprintf and rapidjson wirter? HOT 2
- Deserialization fails on invalid unicode code point
- Stack overflow on rapidjson HOT 3
- Invalid static_cast in regex.h
- rapidjson version 2.0 HOT 1
- -Werror=free-nonheap-object in allocators.h line 271
- Transforming Schema Validation error objects into user friendly error messages? HOT 1
- When including rapidjson for LMDeploy, I encountered cmake errors HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rapidjson.