Skip to content

Commit b3579b1

Browse files
committed
Stop using wrapped exceptions
Maybe this was for the exception fun with clojure 1.3? Otherwise, there doesn't appear to be any reason for it.
1 parent 7200175 commit b3579b1

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

project.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
(defproject koan-engine "0.1.3"
1+
(defproject koan-engine "0.2.0"
22
:description "Koan Engine for Clojure projects."
3-
:dependencies [[org.clojure/clojure "1.2.1"]
3+
:dependencies [[org.clojure/clojure "1.4.0"]
44
[fresh "1.0.2"]
55
[jline "0.9.94" :exclusions [junit]]])

src/koan_engine/koans.clj

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@
2424
(defn tests-pass? [dojo-path file-path]
2525
(u/with-dojo [dojo-path]
2626
(print "Considering" (str file-path "..."))
27+
(println)
2728
(flush)
2829
(try (load-file file-path)
29-
(do (println) true)
30-
(catch Exception e
31-
(println)
32-
(let [actual-error (or (.getCause e) e)
33-
message (or (.getMessage actual-error)
34-
(.toString actual-error))
35-
; TODO: use ex-info or something to clean this up, once we're
36-
; upgraded to clojure 1.4+
30+
true
31+
(catch Throwable e
32+
(let [message (or (.getMessage e) (.toString e))
33+
; TODO: use ex-info or something to clean this up
3734
line (when-let [groups (first (re-seq #"^\[LINE (\d+)\] "
3835
message))]
3936
(last groups))]

src/koan_engine/util.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
(catch Throwable e#
3838
(throw (Exception. (str ~(when-let [line (:line (meta x))]
3939
(str "[LINE " line "] "))
40-
'~message "\n" '~x)
41-
e#))))))
40+
'~message "\n" '~x)))))))
4241

4342
(defn read-project []
4443
(let [rdr (clojure.lang.LineNumberingPushbackReader.

0 commit comments

Comments
 (0)