-
Notifications
You must be signed in to change notification settings - Fork 92
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
About exceptions handling #153
Comments
Yeah, we currently don't have a no exception option for JSON. Binary reading/writing doesn't throw errors, as it expects proper data generated from the library. We plan to implement a no exception compile time option for JSON, but there is actually a performance loss when going to another error handling approach (exceptions allow us to reduce the number of branch checks). We also want to make sure we're not over complicating the code base and have a good implementation. But, I have an idea I'll experiment with. Do you have a target platform that doesn't allow exceptions? Thanks for bringing this up and hopefully it will be tackled soon. |
Thanks for your answer! Mainly, these platforms are Linux and macOS, where I disable exceptions and do everything explicitly. It is possible to work around that by compiling a part of the project that uses Glaze as a shared library and only use exceptions in that library. However, it would be great to see such an opportunity in Glaze, since there are platforms where the use of exceptions is not allowed at all. |
Yeah, we want to be able to build on embedded hardware in the future, so disabling exceptions is required. Thanks for the encouragement to work on this. |
@Bolderaysky The no_except branch (#156) has been merged, so you can now build with -fno-exceptions |
I found that glaze is throwing exceptions by default. First looking at the code and repo, I find that glaze doesn't support exception-free mode. Is it possible to implement that for using glaze in projects with no exceptions?
The text was updated successfully, but these errors were encountered: