Thanx for ur quick response,
And its not making difference by changing "exception" to "e".
I am still getting this error:
java.lang.Exception: Can't bind qualified name:nlplabs.webfetch.agent/
e

Thanx
Regards
Manish Zedwal

On Jan 25, 5:03 pm, Michael Wood <esiot...@gmail.com> wrote:
> 2010/1/25 Manish <manish.zed...@gmail.com>:
>
>
>
> > Hi,
> > I am new to clojure. I want to use try-catch block to the  (.getPage
> > *wc* ~url) statement of code. But I am getting this error:
> > java.lang.Exception: Can't bind qualified name:nlplabs.webfetch.agent/
> > exception
>
> > Would u pls help me to sort out this problem?
>
> > Thanx in advance
>
> > Code snippet:
> > (ns nlplabs.webfetch.agent)
>
> > (def *page* nil)
>
> > (defmacro with-page [url & forms]
> >  `(binding [*page* (wrap (log :info "Fetching page at URL " ~url)
> >                          (try
> >                           (.getPage *wc* ~url)
> >                           (catch Exception exception
> >                             (println exception)
> >                             (.clear exception)))
> >                          (log :info "Done fetching page at URL "
> > ~url))
> >             *page-dom* (page-dom-fn)]
> >     ~...@forms))
>
> Do you have something else in that namespace called "exception"?
>
> See if this makes a difference:
>
> (defmacro with-page [url & forms]
>   `(binding [*page* (wrap (log :info "Fetching page at URL " ~url)
>                           (try
>                             (.getPage *wc* ~url)
>                             (catch Exception e
>                               (println e)
>                               (.clear e)))
>                           (log :info "Done fetching page at URL " ~url))
>              *page-dom* (page-dom-fn)]
>     �...@forms))
>
> --
> Michael Wood <esiot...@gmail.com>

-- 
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

Reply via email to