Welcome! Please see the About page for a little more info on how this works.

0 votes
in Tools by

If a FileNotFoundException is thrown while running a program started with clojure -X, then it will print "Namespace could not be loaded " rather than the FileNotFoundException. This differs from -M.

Minimal repro for clojure -X misreporting FileNotFoundException.

bash-3.2$ clojure -X main/-main
finished loading main
Namespace could not be loaded: main

This behavior differs from -M

bash-3.2$ clojure -M -m main
finished loading main
Execution error (FileNotFoundException) at main/-main (main.clj:4).

Full report at:

Not a big deal, but came up when working on a command line tool, https://github.com/phronmophobic/membrane.term/issues/5. Basically, the FileNotFoundException would have been a suboptimal (but acceptable) error message for a non existent color scheme file, but the namespace message is misleading.

Version info:

bash-3.2$ clojure --version
Clojure CLI version

1 Answer

+2 votes
selected by
Best answer

Thanks, I've fixed it for the next release.

Wow! Thanks!
Thanks. I ran into a similar issue just over a week ago and I've been meaning to add an "ask" about it!