ConfigMe icon indicating copy to clipboard operation
ConfigMe copied to clipboard

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

Open ljacqu opened this issue 2 years ago • 0 comments

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)
  • 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 avatar Aug 12 '23 12:08 ljacqu