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

Error handling #26

Merged
merged 4 commits into from
Aug 16, 2024
Merged

Error handling #26

merged 4 commits into from
Aug 16, 2024

Conversation

NonSwag
Copy link
Member

@NonSwag NonSwag commented Aug 16, 2024

Properly handle errors for plugin chunk generator related issues

image
image

Introduced a custom exception, `GeneratorException`, to handle scenarios where a requested plugin cannot be found, is disabled, or does not provide the required chunk generator or biome provider. Updated package-info.java to enforce not null constraints across the package.
Replaced `Preconditions` with custom `GeneratorException` for better error context. Improved readability and maintainability by making error messages more specific and informative.
The import for GeneratorView was removed because it is no longer used in the LevelExtras class. Keeping the code clean and free of unnecessary imports helps improve readability and maintainability.
Catch and log a specific GeneratorException during level loading to provide detailed error messages about generator issues. This improves error handling and makes debugging easier by specifying which generator failed and why.
@NonSwag NonSwag merged commit b50f31e into master Aug 16, 2024
1 check passed
@NonSwag NonSwag deleted the error-handling branch August 16, 2024 16:30
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