configurator icon indicating copy to clipboard operation
configurator copied to clipboard

Export accessor function for a Config's subconfig'd root

Open mightybyte opened this issue 11 years ago • 1 comments

Sometimes I like to display my own custom error messages when certain config options are missing. In these cases, it is often desirable to tell the user the full "path" of the option that was missing so it is easy to rectify the problem. I currently can't do this because the "root" field accessor is not exported. Configurator's require function also doesn't display the full path. I don't think it's sufficient to just improve the require function because I often find myself wanting fully customized error messages.

mightybyte avatar Feb 11 '14 03:02 mightybyte

I'd like to chime in that this would be super useful. Even improving the error message for require (https://github.com/bos/configurator/blob/ff6d476562e9ff8b757832a81076d57e7a600fcf/Data/Configurator.hs#L244) to include the root of the config would be a big help

charles-cooper avatar Jan 19 '18 00:01 charles-cooper