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

Refactor RealDecoder for improved error handling and code readability #42

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

ryan-gang
Copy link
Contributor

This pull request includes several refactorings in the RealDecoder class to enhance error handling and improve code readability. The commits in this pull request replace direct byte manipulation with appropriate method calls to abstract away complexity and improve error handling. Error messages have been enhanced by adding context to decoding errors, aiding in debugging. Additionally, the readability and maintainability of the GetArrayLength, GetCompactInt32Array, GetInt32Array, and GetInt64Array methods have been improved. These changes contribute to a more robust and maintainable RealDecoder implementation.

- Replaced direct byte manipulation with GetInt32 method for better abstraction and error handling.
- Enhanced error messages by adding context to decoding errors.
- Improved readability and maintainability of GetArrayLength, GetCompactInt32Array, and GetInt32Array methods.
…rror handling and readability

- Replaced direct byte manipulation with GetInt32 method to abstract away complexity and improve error handling.
- Added context to decoding errors for better debugging.
- Enhanced readability and maintainability of the GetArrayLength function.
- Replaced direct byte manipulation with a call to GetInt64 for improved abstraction.
- Added context to decoding errors to aid in debugging.
- Improved overall readability and maintainability of the GetInt64Array function.
Copy link

linear bot commented Jan 9, 2025

@ryan-gang ryan-gang self-assigned this Jan 9, 2025
@ryan-gang ryan-gang merged commit 763a39a into main Jan 9, 2025
2 checks passed
@ryan-gang ryan-gang deleted the CC-1572 branch January 9, 2025 18:04
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.

1 participant