Affects Version/s: Release 1.5
Fix Version/s: None
I stumbled across a behavior of some-> when used with macros, and I'm wondering whether it's expected.
I started with something like this:
Then I realized that quux might throw an exception, which I want to ignore, so had the possibly misguided idea to do this:
(defmacro catch->nil [& body]
`(try ~@body (catch Exception _# nil)))
My mental model of some-> is that it should end up wrapping the whole expression in a try-catch, as
> does, but that does not happen. some> expands into a `let` instead of a deeply-nested form, so the exception is not caught.
Certainly easy to work around, now that I know about it, but I thought perhaps this was not intended.