jbasko / configmanager

Forget about configparser, YAML, or JSON parsers. Focus on configuration. NOT RECOMMENDED FOR USE (2019-01-26)
MIT License
17 stars 5 forks source link

Inconsistency in NotFound and hooks #141

Closed jbasko closed 7 years ago

jbasko commented 7 years ago

There is a hook called "not_found" which is not currently taken care of if a non-existent path is requested through iterator interface.

Not sure if it would make sense to wire them together because path actually contains more information than just one missing name -- we could actually be able to detect if user is looking for a missing section or item.

Perhaps a new exception class PathNotFound? And rename NotFound to NameNotFound?

Or just have path and name attributes on NotFound?

Anyway, either the exception has to change or the hook must be wired to stay consistent.