Pedro Santos
2015-08-28 09:45:51 UTC
Hello,
I'm having some troubles trying to issue a get that produces an error and
send it to an async channel. Here's what I have:
1 (defn- fetch-response
2 "Fetches the response as an async channel"
3 [url]
4 (try
5 (let [async-stream (http/get (str "http://" url)
{:connection-timeout 5000
6 :request-timeout
5000})
7 c (chan)]
8 (s/connect async-stream c)
9 c)
10 (catch Exception e
11 (print \E))))
I can't catch the exception. It says that the exception is on line 5, don't
know if it's async and I'm not doing this right.
Can someone help me?
Thanks.
I'm having some troubles trying to issue a get that produces an error and
send it to an async channel. Here's what I have:
1 (defn- fetch-response
2 "Fetches the response as an async channel"
3 [url]
4 (try
5 (let [async-stream (http/get (str "http://" url)
{:connection-timeout 5000
6 :request-timeout
5000})
7 c (chan)]
8 (s/connect async-stream c)
9 c)
10 (catch Exception e
11 (print \E))))
I can't catch the exception. It says that the exception is on line 5, don't
know if it's async and I'm not doing this right.
Can someone help me?
Thanks.
--
You received this message because you are subscribed to the Google Groups "Aleph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aleph-lib+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Aleph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aleph-lib+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.