Skip to content

Clearer error messaging for undefined keys #111

@enspritz

Description

@enspritz

I was adding in some new components into an Integrant configuration, and took the opportunity to see how Integrant reacts to keys being specified in the conf file but not implemented. Given

{:admin/jetty {}
 :admin/routes {}
 ... }

IG failed with:

Execution error (IllegalArgumentException) at integrant.core/eval9575$fn (core.cljc:404).
No such namespace: admin

I think a better error message here would speak directly to the cause, for example:

Reference/key is unknown to Integrant: :admin/jetty

Like Figwheel, it might even go on to suggest clues to assist in remediation, such as the fact that the key wasn't registered with IG using defmethod, no admin namespace was found, no symbol :admin/jetty was found in a present admin namespace, and so on..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions