   (cond
   	(.startsWith (.getClassName element) "clojure.lang.") :c-omitted-frame))
        
+(defn convert-clojure-frame
+	"Converts a stack frame into DOM nodes representing the Clojure namespace and function name(s),
+	or returns nil if the stack frame is not for a Clojure call frame."
+	[class-name method-name]
+	(debug "Converting: %s.%s" class-name method-name)
+	(when (contains? #{"invoke" "doInvoke"} method-name)
+		(let [[namespace-name & raw-function-ids] (s2/split class-name #"\$")
+		_ (debug "Raw function ids: %s" (ppstring raw-function-ids))
+				  function-ids (map #(nth (first (re-seq #"(\w+)__\d+" %)) 1 nil) raw-function-ids)
+				  _ (debug "Function ids: %s" (ppstring function-ids))
+				  function-names (map #(s2/replace % \_ \-) function-ids)]				 
+		  (if-not (empty? raw-function-ids)
+		  	(template
+		  		namespace-name "/" (s2/join "/" function-names)
+		  	  :span { :class :c-omitted } [ " " class-name "." method-name])))))
+     
 (defn transform-stack-frame
   [#^StackTraceElement element]
   ;; TODO: some regexp matching to identify Clojure stack frames and transform them into a better format.

(ns #^{:doc "Exception reporting"}
  cascade.exception
  (:import (java.lang Throwable StackTraceElement))
  (:use 
  	cascade 
  	(cascade config logging pipeline)))
  
;; Identifies the properties of Throwable that are excluded from each exception-map's set of properties  

      
      :ul { :class :c-exception-report } [
        (template-for [m (expand-exception-stack (-> env :cascade :exception))]
          :li { :class (if (nil? (m :stack-trace)) :c-omitted) } [ (render-exception-map m) ])
      ]
      ;; TODO request details, session details? etc.
    ]
