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

Documentation on when C++ exceptions are thrown #493

Closed
fklebert opened this issue Mar 20, 2023 · 1 comment
Closed

Documentation on when C++ exceptions are thrown #493

fklebert opened this issue Mar 20, 2023 · 1 comment
Assignees
Labels
documentation Documentation change is needed enhancement New feature or request
Milestone

Comments

@fklebert
Copy link
Contributor

As zserio is not exception free, the use in functional safe systems may sometimes raise questions on when zserio throws exceptions, so that these can potentially be avoided by other means.

We should document the circumstances when zserio throws exceptions and what can be done to ensure that a reader system does not run into these.
One can be that for example the data has to be parsed on a test system before it is shipped to a functional safe system. If the parser does not throw exceptions on the test system it is guaranteed that it also will not throw on the safe system in case the data is still the same (to be safeguarded by signing the data, etc.)

It may sound strange to document that in zserio docs, but it will for sure help anyone deploying zserio to a system that does not allow exceptions.
In a second step we should think about getting the runtime and generated code exception free.

@fklebert fklebert added this to the 2.11 milestone Mar 20, 2023
@mikir mikir added enhancement New feature or request documentation Documentation change is needed labels Mar 21, 2023
@mikir mikir self-assigned this May 3, 2023
@mikir
Copy link
Contributor

mikir commented May 10, 2023

Zserio C++ runtime library together with the C++ generated code can throw a zserio::CppRuntimeException in
some rare circumstances, mainly

  • during parsing (reading)
  • during writing
  • in reflection code
  • in type info code

Because there are hundreds possibilities when exception zserio::CppRuntimeException can be thrown, we will document properly as the first step only exceptions during parsing.

@mikir mikir closed this as completed May 11, 2023
mikir pushed a commit that referenced this issue May 11, 2023
[#493] Improve Functional Safety documentation in README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation change is needed enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants