Skip to content

Comments

Enhance LinuxFsI2CBus validation with detailed exception messages and comprehensive Javadocs#433

Merged
eitch merged 2 commits intodevelopfrom
feature/i2c-bus-validation-enhancements
Jan 6, 2025
Merged

Enhance LinuxFsI2CBus validation with detailed exception messages and comprehensive Javadocs#433
eitch merged 2 commits intodevelopfrom
feature/i2c-bus-validation-enhancements

Conversation

@dariuszzbyrad
Copy link
Member

This update improves the LinuxFsI2CBus class by addressing ambiguous exception messages and enhancing documentation:

  • Detailed Exception Messages: Previously, all validation failures for sysfs and devfs paths (e.g., non-existence, unreadable, unwritable) shared the same error message. These are now split into specific messages, making it easier to diagnose the exact issue during initialization.
  • Comprehensive Javadocs: Added or refined Javadoc comments for all methods and fields to provide clear explanations of their purpose, parameters, and behaviors.
  • Code Refactoring: Streamlined validation methods (validateSysFs and validateAndGetDevFs) to improve readability and maintainability while preserving functionality.

@FDelporte
Copy link
Member

Good idea for the extended error messages! We could probably use more of these through the code... ;-)
@taartspi @eitch OK to merge?

Copy link
Member

@eitch eitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the cleanup

@eitch eitch merged commit 5e17c31 into develop Jan 6, 2025
1 check passed
@eitch eitch deleted the feature/i2c-bus-validation-enhancements branch January 6, 2025 12:14
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.

3 participants