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

Do not print a error message in loadYamlSettings #172

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

felixsch
Copy link
Contributor

While implementing the Data.Yaml.Config module I was stumbling over the this hardcoded putStrLn statement and I think it should be left to the user of the yaml library to decide how to handle exception and not print anything to stdout.

If I missed something and the putStrLn statement is worth keeping just ignore me and close the PR.

Thanks for you're awesome work!

@snoyberg
Copy link
Owner

Thanks for catching this, I definitely don't want a hard-coded putStrLn in here. However, this change will end up losing information on which file failed. Can I ask for a slightly different implementation: introduce a new exception type that includes both the FilePath in question and the underlying exception value and throws that instead of throwIO e. Basically, s/throwIO e/throwIO (LoadYamlSettingsException fp e). Does that make sense?

@felixsch
Copy link
Contributor Author

Good idea, I added the LoadSettingsException exception.

@snoyberg
Copy link
Owner

Awesome, LGTM. One last request: can you add a minor version bump and a changelog entry?

@felixsch
Copy link
Contributor Author

I added the changelog entry and bumped the version

@snoyberg snoyberg merged commit 041e01a into snoyberg:master Jun 26, 2019
@snoyberg
Copy link
Owner

Thanks! I made a slight tweak to make the version number 0.11.1.0 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants