Fork me on GitHub
#clojure
<
2019-07-09
>
ahungry03:07:25

I'm wondering - are there any commonly used (Emacs? Cider? REPL in general?) packages that: truncate long strings automatically? (for instance, if I'm looking at repl output of a large json body where some strings go on and on) and also one (setting/package etc.) that would limit stack trace length? To show only maybe 10 or 20 lines deep vs 100+?

ahungry03:07:34

repl readability packages

dpsutton04:07:00

cider-print-quota and cider-print-options seem like they might be of interest to you

dpsutton04:07:15

i thought long lines had been automatically curbed but i don't remember offhand righ tnow

ahungry04:07:13

What was that lib to pretty print clojure spec checks?

andy.fingerhut04:07:41

There may be others, but perhaps you were thinking of expound? https://github.com/bhb/expound

ahungry04:07:29

thats the one, ty 🙂

otwieracz07:07:01

I am working on proper error handling in my app - but I need to throw them first. Should I throw ex-info exceptions, or should try to throw some Java exceptions?

Stefan07:07:28

Yes I’m also running into that, interested in the answer 🙂

lread11:07:16

The ex-info exceptions have the advantage of working across Clojure and ClojureScript.

seancorfield17:07:44

It really depends on what your app is doing, what sorts of errors you are wanting to report, etc etc.

seancorfield17:07:35

If you're checking arguments, it makes sense to throw IllegalArgumentException in my opinion. But "general" exceptions can be handled well with ex-info.

seancorfield17:07:39

The main issue with using ex-info is that you can only catch one type of exception, so you then need a bunch of conds on ex-data results if you need to handle different exceptions in different ways.

shubham09:07:36

What does the orange code highlight seen in the cloverage HTML report mean?

Stefan10:07:43

CSS class on those HTML elements is partial, and it’s in the “line coverage”, so I’m guessing it’s partially covered lines…

shubham11:07:29

Yeah, I remember reading somewhere that it’s basis the hits count. partially covered forms have lesser hits compared to the fully covered forms.

pinkfrog09:07:50

in reading this code: