Fork me on GitHub
#clojure-uk
<
2016-05-08
>
benedek08:05:49

@agile_geek: it is also amazing, perhaps that is enough 😉 loads of stuff is done in literate programming afaik so you might get some serious org foo out of it too...

agile_geek09:05:38

@dharrigan: remember you can throw good old Java exceptions in Clojure too.

benedek09:05:49

dharrigan: not sure but if i remember right http-kit returns a placeholder for errors in a map which represents (the map) the whole response. that is option too if you don’t want to throw

agile_geek09:05:11

I always think exceptions are more an option for errors that the caller could never recover from. Over remote calls the better way to handle this is an error response status with a body containing specifics e.g. http 500 + json error object or the like.

glenjamin17:05:04

My personal metric is: do I want to force callers to care, or let them choose to not write any code and have the error abort

glenjamin17:05:52

if the former I’ll do a wrapped success/failure type (eg Either or Maybe), if the latter i’ll use exceptions