Skip to content

Invalid emit values fail in a way that's hard to trace [0.2.21] #34

@hlship

Description

@hlship

I forgot to wrap a keyword in a vector, got this exception:

java.lang.IllegalArgumentException: No method in multimethod 'emit' for dispatch value: null
	at clojure.lang.MultiFn.getFn(MultiFn.java:156)
	at clojure.lang.MultiFn.invoke(MultiFn.java:238)
	at huff2.core$eval20274$fn__20277.invoke(core.clj:261)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at huff2.core$eval20138$fn__20140.invoke(core.clj:202)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at huff2.core$eval20138$fn__20140.invoke(core.clj:202)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at huff2.core$html.invokeStatic(core.clj:281)
	at huff2.core$html.invoke(core.clj:265)
	at huff2.core$html.invokeStatic(core.clj:271)
	at huff2.core$html.invoke(core.clj:265)

That made it very hard to track down; would be better if the offending value (or even some kind of path down to the offending value) was identified. Especially keyword could be a special case with an error like "Wrap the keyword in a vector to form a HTML element."

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