Permalink
Browse files

Fix a bug in r.m.stacktrace that coused it to omit the stack elements…

… in the response.
  • Loading branch information...
1 parent a37ad20 commit edbf825f3caf065873e0be263ef3c80796ab9ef5 @mmcgrana committed Mar 17, 2010
Showing with 13 additions and 12 deletions.
  1. +13 −12 ring-devel/src/ring/middleware/stacktrace.clj
View
25 ring-devel/src/ring/middleware/stacktrace.clj
@@ -22,18 +22,19 @@
[:td.method (h (java-method-str elem))]]))
(defn- html-ex-view [e]
- (html
- (doctype :xhtml-transitional)
- [:html {:xmlns "http://www.w3.org/1999/xhtml"}
- [:head
- [:meta {:http-equiv "Content-Type" :content "text/html;charset=utf-8"}]
- [:title "Ring: Stacktrace"]
- [:style {:type "text/css"} css]
- [:body
- [:div#content
- [:h3.info (h (str e))]
- [:table.trace [:tbody
- (map elem-partial (:trace-elems e))]]]]]]))
+ (let [e-parsed (parse-exception e)]
+ (html
+ (doctype :xhtml-transitional)
+ [:html {:xmlns "http://www.w3.org/1999/xhtml"}
+ [:head
+ [:meta {:http-equiv "Content-Type" :content "text/html;charset=utf-8"}]
+ [:title "Ring: Stacktrace"]
+ [:style {:type "text/css"} css]
+ [:body
+ [:div#content
+ [:h3.info (h (str e))]
+ [:table.trace [:tbody
+ (map elem-partial (:trace-elems e-parsed))]]]]]])))
(defn- html-ex-response [e]
(-> (response (html-ex-view e))

0 comments on commit edbf825

Please sign in to comment.