Fork me on GitHub
#cider
<
2016-11-23
>
igrishaev06:11:56

Hello guys, can anyone help me with debugging code via unit tests? I'm setting the breakpoint somewhere as the cider docs say, then I put coursor on the test and press C-t t to run it, but no debug interruption happens. What am I doing wrong? Thanks.

rmuslimov08:11:01

@igrishaev works on my laptop

rmuslimov08:11:55

check may be you call other (old function with old name) or something like that

jmglov12:11:55

Hi guys! When I print an exception in the CIDER REPL, I get a really nice data structure:

user> (try (/ 1 0)
        (catch Exception e e))
#error {
 :cause "Divide by zero"
 :via
 [{:type java.lang.ArithmeticException
   :message "Divide by zero"
   :at [clojure.lang.Numbers divide "Numbers.java" 158]}]
 :trace
 [[clojure.lang.Numbers divide "Numbers.java" 158]
  [clojure.lang.Numbers divide "Numbers.java" 3808]
...
]}

jmglov12:11:51

How does CIDER do this? I'd like to programatically do stuff to an exception in my regular Clojure code, and I'm having a hard time finding anything that allows me to deal with exceptions as data structures.

mpenet12:11:03

I think this uses Throwable->map

mpenet12:11:23

not sure tho

jmglov12:11:37

I'll check it out!

jmglov12:11:14

@mpenet You were exactly right and I love you forever and ever!

jmglov12:11:03

BTW, weren't you hanging out in the Pixie Gitter a while back? I remember your handle, but not the context.

mpenet12:11:19

yes, same person!

mpenet12:11:29

I messed a bit with Pixie back then

mpenet12:11:51

i ported a few clj libs to pixie + contributed a bit

jmglov12:11:27

Nice that my memory kinda works. Thanks for the help!