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

          [:div.filtered java-name])
        java-name)
      ]
     [:td.source-location (:file element)]
     [:td (if (and (-> line s/blank? not)
                   (-> line (Integer/parseInt) pos?))
            line
            "")]
     ]))

(defn- exception->markup
  "Given an analyzed exception, generate markup for it."
  [{^Throwable e :exception
    :keys        [properties root]}]
  (html
    [:div.panel.panel-default
     [:div.panel-heading
      [:h3.panel-title (-> e .getClass .getName)]
      ]
     [:div.panel-body
      [:h4 (.getMessage e)]
      ;; TODO: sorting
      (when-not (empty? properties)
        [:dl

(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?
