Skip to content

Ctor-2209 rust snmp catch every panic and return unknown with an stdout message - #6324

Merged
omercier merged 6 commits into
developfrom
CTOR-2209-catcher-les-panic-pour-toujours-envoyer-un-statut-unknown-et-une-output-le-plus-parlant-possible-la-ou-on-a-des-unwrap
Jul 28, 2026
Merged

Ctor-2209 rust snmp catch every panic and return unknown with an stdout message#6324
omercier merged 6 commits into
developfrom
CTOR-2209-catcher-les-panic-pour-toujours-envoyer-un-statut-unknown-et-une-output-le-plus-parlant-possible-la-ou-on-a-des-unwrap

Conversation

@Evan-Adam

@Evan-Adam Evan-Adam commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

This pr add a panic catcher and replace some (not all) of the unwrap to proper Result error.

Fixes # CTOR-2209

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Functionality enhancement or optimization (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

How this pull request can be tested ?

See automated tests for the case "no host answer our query", some other error (like not being able to bind a local port) are harder to test

Checklist

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (develop).
  • In case of a new plugin, I have created the new packaging directory accordingly.
  • I have implemented automated tests related to my commits.
    • Data used for automated tests are anonymized.
  • I have reviewed all the help messages in all the .pm files I have modified.
    • All sentences begin with a capital letter.
    • All sentences end with a period.
    • I am able to understand all the help messages, if not, exchange with the PO or TW to rewrite them.
  • After having created the PR, I will make sure that all the tests provided in this PR have run and passed.

@Evan-Adam
Evan-Adam force-pushed the CTOR-2209-catcher-les-panic-pour-toujours-envoyer-un-statut-unknown-et-une-output-le-plus-parlant-possible-la-ou-on-a-des-unwrap branch from 1aacdcb to f751344 Compare July 28, 2026 11:24
@Evan-Adam
Evan-Adam force-pushed the CTOR-2209-catcher-les-panic-pour-toujours-envoyer-un-statut-unknown-et-une-output-le-plus-parlant-possible-la-ou-on-a-des-unwrap branch from f751344 to 6d2112b Compare July 28, 2026 11:24
@Evan-Adam
Evan-Adam marked this pull request as ready for review July 28, 2026 13:01
@Evan-Adam
Evan-Adam requested review from a team as code owners July 28, 2026 13:01
@Evan-Adam
Evan-Adam requested review from bouda1, omercier, sdepassio and sechkem and removed request for a team and sechkem July 28, 2026 13:01
@omercier
omercier merged commit 202388c into develop Jul 28, 2026
51 checks passed
@omercier
omercier deleted the CTOR-2209-catcher-les-panic-pour-toujours-envoyer-un-statut-unknown-et-une-output-le-plus-parlant-possible-la-ou-on-a-des-unwrap branch July 28, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants