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

fix: 🩹improve error handling in PCICReceiver #19

Merged
merged 2 commits into from
Aug 2, 2024
Merged

Conversation

graugans
Copy link
Owner

@graugans graugans commented Aug 2, 2024

This commit improves the error handling in the PCICReceiver struct by updating the Error method to print the error message with the error ID. It also adds a new method errorParser to the PCICClient struct that parses the error message from the given data string. This method uses a regular expression to extract the error ID and message. Additionally, it handles the case where the error ID is all zeros.

This commit improves the error handling in the `PCICReceiver` struct by updating the `Error` method to print the error message with the error ID. It also adds a new method `errorParser` to the `PCICClient` struct that parses the error message from the given data string. This method uses a regular expression to extract the error ID and message. Additionally, it handles the case where the error ID is all zeros.
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 58.33333% with 10 lines in your changes missing coverage. Please review.

Project coverage is 22.43%. Comparing base (1531803) to head (348eb24).

Files Patch % Lines
pkg/pcic/protocol.go 60.86% 6 Missing and 3 partials ⚠️
cmd/ovp8xx/cmd/pcic.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2      #19      +/-   ##
==========================================
- Coverage   22.52%   22.43%   -0.10%     
==========================================
  Files          23       23              
  Lines        1323     1333      +10     
==========================================
+ Hits          298      299       +1     
- Misses       1020     1026       +6     
- Partials        5        8       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@graugans graugans merged commit 2aaddc3 into v2 Aug 2, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants