Skip to content
Snippets Groups Projects

Better Error Handling and Logging

Merged Timm Fitschen requested to merge dev into main

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 and Message 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

Merge request reports

Pipeline #11079 passed

Pipeline: caosdb-cppinttest

#11090

    Pipeline passed for 1e8ceeb2 on dev

    Approval is optional

    Merged by Timm FitschenTimm Fitschen 3 years ago (Aug 2, 2021 7:04pm UTC)

    Merge details

    • Changes merged into main with f33ae771.
    • Did not delete the source branch.

    Pipeline #11114 canceled

    Pipeline canceled for f33ae771 on main

    Activity

    Filter activity
    • Approvals
    • Assignees & reviewers
    • Comments (from bots)
    • Comments (from users)
    • Commits & branches
    • Edits
    • Labels
    • Lock status
    • Mentions
    • Merge request status
    • Tracking
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • Timm Fitschen
  • mentioned in merge request caosdb-cppinttest!2 (merged)

  • Timm Fitschen requested review from @daniel and @florian

    requested review from @daniel and @florian

  • Timm Fitschen marked the checklist item All automated tests pass as completed

    marked the checklist item All automated tests pass as completed

  • Timm Fitschen marked the checklist item Reference related Issues as completed

    marked the checklist item Reference related Issues as completed

  • Timm Fitschen marked the checklist item Annotations in code (Gitlab comments) as completed

    marked the checklist item Annotations in code (Gitlab comments) as completed

  • Timm Fitschen changed the description

    changed the description

  • Timm Fitschen changed the description

    changed the description

  • Florian Spreckelsen marked the checklist item I understand the intent of this MR as completed

    marked the checklist item I understand the intent of this MR as completed

  • Florian Spreckelsen marked the checklist item All automated tests pass as completed

    marked the checklist item All automated tests pass as completed

  • Florian Spreckelsen
  • C-part looks fine to me.

  • Florian Spreckelsen approved this merge request

    approved this merge request

  • Daniel Hornung added 2 commits

    added 2 commits

    • b9aa2c79 - MAINT: Renamed GenericException -> Exception.
    • a178b2dc - MAINT: Renamed CAOSDB_LOG -> LOG.

    Compare with previous version

  • Daniel Hornung added 1 commit

    added 1 commit

    Compare with previous version

  • Daniel Hornung
  • Daniel Hornung
  • Daniel Hornung added 3 commits

    added 3 commits

    • bb681fe3 - DOC: Documentation and typos.
    • a561306b - MAINT: Reduced required CMake version to 3.13 (provided by Debian)
    • 71285aec - STY: Formatting.

    Compare with previous version

  • Daniel Hornung marked the checklist item The test environment setup works and the intended behavior is as completed

    marked the checklist item The test environment setup works and the intended behavior is as completed

  • Daniel Hornung marked the checklist item In-code documentation and comments are up-to-date. as completed

    marked the checklist item In-code documentation and comments are up-to-date. as completed

  • Daniel Hornung approved this merge request

    approved this merge request

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading