Thanks a lot Francis.
It worked perfectly!

On Sunday, 17 August 2014 18:03:49 UTC+3, Yehonathan Sharvit  wrote:
> I am trying to write a macro deftry that defines a function enveloped in a 
> try/catch statement that will sends the error to Honeybadger. Everything 
> works fine except the fact that I don't know how to pass a js object to the 
> notify function of Honeybadger. It seems that I cannot call clj->js from 
> inside a macro definition. 
> 
> This is my code:
> 
> (defmacro deftry [name args & body]
>   `(defn ~name ~args
>      (try ~@body
>           (catch js/Object e#
>             (.notify js/Honeybadger e# (clj->js {:context {:function 
> '~name}}))))))
> 
> 
> Any idea how to solve this?

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to