AuthMe / ConfigMe

A simple configuration management library for any Java project!
MIT License
37 stars 14 forks source link

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

Open ljacqu opened 1 year ago

ljacqu commented 1 year ago

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.

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