failjure
failjure copied to clipboard
Tuple destructuring inside attempt-all causes an exception because the Failure is not short-circuited early enough
Special case of #15: map destructuring works fine now, but tuple destructuring chokes.
Correctly returns either Failure or the expected values:
(f/attempt-all [{:keys [a b]}
(if (< (rand) 0.5) (f/fail "test") {:a 1 :b 2})] [a b])
Throws UnsupportedOperationException when it doesn't return the expected values:
(f/attempt-all [[a b]
(if (< (rand) 0.5) (f/fail "test") [1 2])] [a b])