Better Error Handling and Logging
Summary
Better error handling (less exceptions, more error codes) and logging (for more detailed error handling and configuration issues).
Issue: https://gitlab.indiscale.com/caosdb/customers/lfpb/management/-/issues/390
See also the tests in caosdb-cppinttest!2 (merged)
Focus
- The TransactionStatus class represents the current status of a Transaction instance.
- The TransactionCode is a numeric representation of the status and intended for c-compatible error handling.
-
Messages
andMessage
classes handle the errors, warnings and info messages that come from the server. - Logging: The logging can be configured via a json file. Otherwise the default configuration is in place.
- A lot of code was moved in order to comply with -pedantic flag. Don't waste your time
Test Environment
Unit tests should run as described in README_SETUP
Integration tests should run against a linkahead in the f-grpc branch
Check List for the Author
Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines
-
All automated tests pass -
Reference related Issues -
Up-to-date CHANGELOG.md -
Annotations in code (Gitlab comments) - Intent of new code
- Problems with old code
- Why this implementation?
Check List for the Reviewer
-
I understand the intent of this MR -
All automated tests pass -
Up-to-date CHANGELOG.md -
The test environment setup works and the intended behavior is reproducible in the test environment -
In-code documentation and comments are up-to-date. -
Check: Are there spezifications? Are they satisfied?
For further good practices have a look at our review guidelines.
Edited by Daniel Hornung