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

Invalid format of the config - User friendly message #13

Open
LukasRychtecky opened this issue Apr 23, 2018 · 1 comment
Open

Invalid format of the config - User friendly message #13

LukasRychtecky opened this issue Apr 23, 2018 · 1 comment

Comments

@LukasRychtecky
Copy link

Hi,

I've noticed that when config.edn is in invalid format (e.g. "Map literal must contain an even number of forms") in a stack trace you will see something like java.lang.RuntimeException: Map literal must contain an even number of forms, compiling:(dev.clj:41:11) after calling (dev) in REPL. It points into dev.clj which is confusing. What do you think about to wrap read-config in https://github.com/duct-framework/core/blob/master/src/duct/core.clj#L123 into try-catch and raise an exception within a message like: "Tip: Check you configuration in resources/fooproject/config.edn for format errors"?

@weavejester
Copy link
Contributor

This is a good idea, but let's do it in a way that doesn't hide information from the developer either.

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

No branches or pull requests

2 participants