tolitius / mount

managing Clojure and ClojureScript app state since (reset)
Eclipse Public License 1.0
1.22k stars 88 forks source link

(mount/start nil) throws the craziest errors (hard to debug) #129

Open boxxxie opened 1 year ago

boxxxie commented 1 year ago

i get JVM level errors when (mount/start nil) is called

Execution error (StringIndexOutOfBoundsException) at jdk.internal.util.Preconditions$1/apply (Preconditions.java:55). Index 0 out of bounds for length 0

i thought that it would be ok to call it that way because it usually takes in a set, and nil is the empty set. i don't think that it's important for mount to work with nil, but i think it should throw an error...

{:pre (not-empty states)} would be good enough to avoid the super low level errors