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

Conversion of error codes to hex for error message formatting. #7862

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Jan 26, 2024

This PR adds conversion to hex for the error codes.

It will help in investigating issues like #7855, as we will see the hex representation of the error code. This makes it easier to search for the error, especially in the case of Windows. For *nix systems, this change is harmless.

Related issue: #7863

@drew2a drew2a changed the title Refactor error code conversion and update error message formatting Conversion of error codes to hex for error message formatting. Jan 26, 2024
- Refactored the `error_code_to_hex` method in `CoreManager` to convert a signed integer error code to a hexadecimal string.
- Updated the `format_error_message` method in `CoreManager` to include the converted hex error code in the error message.
- Added tests for the new `error_code_to_hex` method, covering both negative and positive error codes.
@drew2a drew2a marked this pull request as ready for review January 26, 2024 11:01
@drew2a drew2a requested review from a team and xoriole and removed request for a team January 26, 2024 11:01
@drew2a drew2a merged commit 404ae39 into Tribler:main Jan 26, 2024
35 checks passed
@drew2a drew2a deleted the feature/hex_error_code branch January 26, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants