Skip to content
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

Disabling try catch exceptions #680

Open
Mallikarjuna-Mbrdi opened this issue Jan 17, 2025 · 2 comments
Open

Disabling try catch exceptions #680

Mallikarjuna-Mbrdi opened this issue Jan 17, 2025 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@Mallikarjuna-Mbrdi
Copy link

Is your feature request related to a problem? Please describe.
We have a project guidelines where try catch exception handling is prohibited.

Describe the solution you'd like
is it possible to provide a flag which can disable the exception handling during the c++ code generation(example: -setCppAllocator polymorphic)?

Describe alternatives you've considered
I am planning to edit the generated code, like logging and returning in place of throwing an exception.

Additional context
If Disabling during the generation is possible, please let me know the release version.
or is it possible to make this feature available in zserio-2.14.0?

@Mallikarjuna-Mbrdi Mallikarjuna-Mbrdi added the enhancement New feature or request label Jan 17, 2025
@Mallikarjuna-Mbrdi
Copy link
Author

Please free to suggest some workaround to handle the removal of exceptions.

@mikir mikir added this to the Backlog milestone Jan 17, 2025
@mikir
Copy link
Contributor

mikir commented Jan 17, 2025

OK. I understand.

The main problem is that the generated C++ code relies on exceptions by design. There is no feasible way to slightly modify the Zserio C++ generator to disable exceptions. The only approach I can see involves a significant redesign and rewrite of the Zserio C++ generator. However, this is far beyond our current capabilities.

Perhaps, proper documentation of all possible exceptions that can be thrown during reading (parsing) would be sufficient for your project. If so, we have such documentation available just because of this reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants