Sorry, I meant to ask how to fail with a promise? It seems that there is no 
fail method.

On Friday, August 7, 2015 at 4:52:47 PM UTC-4, Francis Avila wrote:
>
> Futures automatically capture exceptions raised in their bodies and 
> reraise them when the future is derefed. Promises also throw exceptions 
> when derefed.
>
> Unlike promises, futures are created with the code that delivers their 
> value, so calling fail and deliver explicitly on a future makes no sense.
>
> Think of futures as a thin wrapper around a promise which spawns a thread, 
> runs the code, and to the wrapped promise either delivers the result of the 
> code or calls (fail private-promise raised-exception) for you.
>
> On Friday, August 7, 2015 at 2:14:30 PM UTC-5, William la Forge wrote:
>>
>> A future fails when it throws an exception. How to do that with a future?
>>
>> It looks like (fail future exception) does not do the trick: 
>> http://dev.clojure.org/display/design/Promises
>>
>>

-- 
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/d/optout.

Reply via email to