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.
https://github.com/phronmophobic/filenotfoundcli
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).
null
Full report at:
/var/folders/fk/l27d_8g52450jh4m7_dhqkr00000gn/T/clojure-16350436886037263655.edn
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.10.3.986