ns-resolve might throw ClassNotFoundException but should return nil
Description
The doc of ns-resolve states that in case the symbol cannot be resolved, it should return nil.
However if the symbol contains dots and is not a resolvable Class, a ClassNotFoundException is thrown
Approach: Catch CNFE when attempting to resolve a dotted symbol as a class and return nil instead.
Patch: clj-1403-2.patch
Screened by: Alex Miller
The attached patch makes ns-resolve return nil in that case instead of throwing an exception
Environment
Activity
Updated patch to apply to master, no other changes, attribution retained.
Updated the patch so that it compiles fine on JDK8
Nicola, the patch 0001-CLJ-1403-ns-resolve-returns-nil-if-class-is-not-foun.patch dated 31 Aug 2014 applies cleanly to latest Clojure master as of Oct 1 2014, but fails to compile with JDK8. I haven't checked whether it compiles cleanly with other JDK versions yet.
Added result of (pst *e) in the description
Can you include the (pst *e) ?