Skip to content

Commit

Permalink
correct strange indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwilk committed Feb 7, 2013
1 parent 75fe895 commit f77a4a3
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Expand Up @@ -111,34 +111,34 @@ project.clj
tensor/parse.clj tensor/parse.clj


```clojure ```clojure
(ns tensor.parse (ns tensor.parse
(:use [slingshot.slingshot :only [throw+]])) (:use [slingshot.slingshot :only [throw+]]))


(defn parse-tree [tree hint] (defn parse-tree [tree hint]
(if (bad-tree? tree) (if (bad-tree? tree)
(throw+ {:type ::bad-tree :tree tree :hint hint}) (throw+ {:type ::bad-tree :tree tree :hint hint})
(parse-good-tree tree hint))) (parse-good-tree tree hint)))
``` ```


math/expression.clj math/expression.clj


```clojure ```clojure
(ns math.expression (ns math.expression
(:require [tensor.parse] (:require [tensor.parse]
[clojure.tools.logging :as log]) [clojure.tools.logging :as log])
(:use [slingshot.slingshot :only [throw+ try+]])) (:use [slingshot.slingshot :only [throw+ try+]]))


(defn read-file [file] (defn read-file [file]
(try+ (try+
[...] [...]
(tensor.parse/parse-tree tree) (tensor.parse/parse-tree tree)
[...] [...]
(catch [:type :tensor.parse/bad-tree] {:keys [tree hint]} (catch [:type :tensor.parse/bad-tree] {:keys [tree hint]}
(log/error "failed to parse tensor" tree "with hint" hint) (log/error "failed to parse tensor" tree "with hint" hint)
(throw+)) (throw+))
(catch Object _ (catch Object _
(log/error (:throwable &throw-context) "unexpected error") (log/error (:throwable &throw-context) "unexpected error")
(throw+)))) (throw+))))
``` ```


Credits Credits
Expand Down

0 comments on commit f77a4a3

Please sign in to comment.