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

Add more dedicated exception types (e.g. invalid YAML) #353

Open
ljacqu opened this issue Aug 12, 2023 · 0 comments
Open

Add more dedicated exception types (e.g. invalid YAML) #353

ljacqu opened this issue Aug 12, 2023 · 0 comments
Milestone

Comments

@ljacqu
Copy link
Member

ljacqu commented Aug 12, 2023

In AuthMe, we handle invalid YAML differently and have to override the YamlFileResource for that reason. Goal within this issue is to introduce more exception types that extend from ConfigMeException so that specific cases like the one described before can be caught by callers.

  • Introduce an exception for invalid YAML (see AuthMe (YamlFileResourceProvider)[https://github.com/AuthMe/AuthMeReloaded/blob/master/src/main/java/fr/xephi/authme/service/yaml/YamlFileResourceProvider.java])
  • See if there are other situations where it would be interesting to have a dedicated exception type

NB: Throwing IllegalArgumentException and IllegalStateException is fine for errors the developer makes while integrating ConfigMe (e.g. invalid property path). Same for "should never happen" kind of deals

@ljacqu ljacqu added this to the ConfigMe 2.0.0 milestone Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant