Ok, but how do you take account of different processing (or non processing) 
needs in the handler (chain) given that something is awry half way down?

(note that in my case the handler is not pure - the validation precedes the 
need for a state change. The state change should occur if the validation 
passes and must not if it fails. I can't validate in advance because that 
would lead to a race condition).

On Wednesday, 20 March 2013 23:24:48 UTC+11, Marko Topolnik wrote:
>
> On Wednesday, March 20, 2013 1:06:54 PM UTC+1, Dave Sann wrote:
>
>> Marko, do you have a good example of doing what you say?
>>
>
> What I had in mind, related to OP's post, would be a middleware that does
>
> (binding [*validation-failures* []] 
>    (handler req) 
>    (do-something-about *validation-failures*))
>
> There would be a global function, such as *add-failure*, which would *conj
> * a new failure to the vector.
>
> -marko
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to