异常处理

;; any function can throw: Clojure has no checked exceptions
;; and no "throws" in a signature at all
(defn method-with-exception []
  (throw (ex-info "test exception" {})))

(try
  (method-with-exception)
  (catch Exception e
    (println "Error happened:" (ex-message e))))