         [:h3 (h (exception-message exception))]
         ]
        ]
-      (write-exception-stack exception)
+      (exception->markup exception)
 
       [:h3 "Request"]
 

     ]))


(defn write-exception-stack
  "Writes the markup for a root exception and its stack of causes, including a stack trace for the deepest exception."
  [^Throwable root-exception]
  (->>
    root-exception
    exception/analyze-exception
    (map exception->markup)
    (apply str)))

(defn build-report

(defn- element->clojure-name [element]
  (let [names (:names element)]
    (list
      (s/join "/" (drop-last names))
      "/"
      [:strong (last names)])))

(defn- element->java-name
  [{:keys [package class simple-class method]}]
  (list
    (if package
      (list
        [:span.package-name package]
        "."
        simple-class)
      class)
    " &mdash; "
    method))

(defn- stack-trace-element->row-markup
  [{:keys [file line names]
    :as   element}]
  (let [clojure? (-> names empty? not)
        java-name (element->java-name element)]
    [:tr
     [:td.function-name
      (if clojure?
