Skip to content

Invalid format of the config - User friendly message #13

@LukasRychtecky

Description

@LukasRychtecky

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"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions