Skip to content

Refactor Exception Handling and Update Documentation #3

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

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Conversation

walmir-silva
Copy link
Contributor

This pull request implements several improvements to our exception handling system and updates the documentation to reflect these changes. The main focus is on centralizing exception creation, improving code consistency, and providing better examples in both English and Portuguese documentation.

Changes

Code Changes

  1. Refactored AbstractException class to include a createException method:

    • Centralized exception creation logic
    • Improved consistency across all exception classes
  2. Updated all custom exception classes to use the new createException method:

    • Reduced code duplication
    • Improved maintainability

Documentation Updates

  1. Updated README.md (English version):

    • Improved usage examples
    • Added examples of logger usage
    • Demonstrated correct use of custom exceptions
  2. Updated README.pt-br.md (Portuguese version):

    • Fixed code examples (kept in English for consistency)
    • Updated explanatory text in Portuguese
    • Improved exception handling demonstration

Testing

  • All existing tests have been updated to reflect the new exception creation method
  • New tests have been added to cover the createException method in AbstractException

…eption::createException

- Update all exception classes to use the createException method from AbstractException
- This change reduces code duplication and improves consistency across exception handling
- Affected files include all custom exception classes in the src/ directory
- Fix code examples in README.pt-br.md
- Keep code in English for consistency
- Update explanatory text in Portuguese
- Improve exception handling demonstration
- Add examples of logger usage
- Demonstrate correct use of custom exceptions
@walmir-silva walmir-silva merged commit 56109df into main Oct 17, 2024
1 check 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.

1 participant