Yes, but not very practical: since I don't know which one to change, this 
would be a huge rewrite of code to eliminate #() and (fn []).


On Friday, December 9, 2016 at 3:16:06 PM UTC-8, Alex Engelberg wrote:
>
> If you're seeing "fn_123", it's probably coming from an anonymous 
> function. Giving those functions a name with the (fn my-name [] ...) syntax 
> will make the stack trace a little easier to decipher:
>
> user=> ((fn [] (/ 1 0)))
>
> ArithmeticException Divide by zero  clojure.lang.Numbers.divide 
> (Numbers.java:158)
>
> user=> (pst)
>
> ArithmeticException Divide by zero
> clojure.lang.Numbers.divide (Numbers.java:158)
> clojure.lang.Numbers.divide (Numbers.java:3808)
> user/eval20851/fn--20852 (form-init8836862334241327650.clj:1)
> ​...​
>
> nil
> user=> ((fn my-fn-with-a-name [] (/ 1 0))
>
> ArithmeticException Divide by zero  clojure.lang.Numbers.divide 
> (Numbers.java:158)
> user=> (pst)
> ArithmeticException Divide by zero
> clojure.lang.Numbers.divide (Numbers.java:158)
> clojure.lang.Numbers.divide (Numbers.java:3808)
> user/eval20857/my-fn-with-a-name--20858 
> (form-init8836862334241327650.clj:1)
> ​...​
>
> nil
>
> On Fri, Dec 9, 2016 at 3:00 PM, Brian Craft <craft...@gmail.com 
> <javascript:>> wrote:
>
>> Trying to profile some code, and the stack traces look like
>>
>> clojure.something0
>>   clojure.something1
>>    clojure.something2
>>      ....
>>       clojure.something100
>>          foo$fn_1000$fn_1002$fn_10003.invoke()
>>
>>
>> How can I figure out what that last function is? I can access the symbol 
>> from the repl, but no idea how to connect it to my code.
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> 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+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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