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

Enhance Exception Handling for I/O Errors #55

Closed
wants to merge 30 commits into from
Closed

Conversation

umegane
Copy link
Contributor

@umegane umegane commented Sep 25, 2024

In Limestone, the error handling for I/O errors was insufficient, particularly for public APIs, where it was unclear what exceptions might be thrown, leading to improper exception handling on the caller side.

To address this issue, the following modifications were made:

  1. The locations where I/O errors can occur were carefully reviewed, and error handling was improved.
  2. Custom exception classes, limestone_exception and its subclass limestone_io_exception, were created to throw appropriate exceptions when I/O errors occur.
  3. For public APIs, we clarified in the documentation where limestone_exception might be thrown due to I/O errors. APIs where no exceptions are thrown were marked with the noexcept keyword.
  4. Logging was added to ensure that error occurrences are properly recorded.

Introduced the `file_operations` class to provide an abstraction layer
for file operations. This allows for easier dependency injection and
mocking of file operations in tests.
- Reviewed all public APIs to ensure the correct exception specifications.
- Corrected APIs that were missing or incorrectly specifying noexcept.
- Updated documentation to clearly state which exceptions are thrown by each API.
- Fixed several areas where exceptions were not being handled properly, ensuring robust error handling.
@umegane
Copy link
Contributor Author

umegane commented Sep 25, 2024

コンフリクトが起きているので、コンフリクトを解消したあと、もう一度プルリクを作成することにします。

@umegane umegane closed this Sep 25, 2024
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