Re: slingshot.slingshot, clj + cljs

2014-01-20 Thread t x
Very nice. Much better than the past 2 hours I spent writing a simpler version of Throwable w/ data, i.e.: (ns MyError (:gen-class :extends java.lang.Throwable :state state :init init :constructors {[Object] []})) (defn -init [obj] [[] obj]) Thanks! On Mon, Jan 20, 2014 at 3:41

Re: slingshot.slingshot, clj + cljs

2014-01-20 Thread Herwig Hochleitner
Maybe your needs are met by the now builtin ex-info and ex-data. They work the same in clj and cljs: (try (throw (ex-info "msg" {:data "map"})) (catch :default e (ex-data e))) kind regards 2014/1/20 t x > Hi, > > ## Basic Question > > Is there a library that: > (1) is like slingshot

slingshot.slingshot, clj + cljs

2014-01-20 Thread t x
Hi, ## Basic Question Is there a library that: (1) is like slingshot.slingshot and (2) has the same syntax + semantics in both clj and cljs ? ## Situation I'm stuck in: * I'm writing code in cljx. Thus, as much as possible, I'd prefer code that simultaneously work with both clj and cljs