Stacktrace with Full Exception Causes #17

Closed
wants to merge 2 commits into
from

2 participants

@youngnh

Adds all causes of an Exception to the returned html of a wrapped stacktrace.

@youngnh

Here's a quick script that I loaded and ran to check that, this time, these changes actually compile and work: https://gist.github.com/907860

It'll leave a stacktrace.html file wherever you run it, which looks nice in a browser. No duplicate div ids, no double tildes without any enclosing syntax quote. My apologies for the terrible first attempt at this.

@weavejester
Collaborator

Better :) - but you don't need the syntax-quote in there at all. You could just write:

[:body (exception-partial e)]

You could also take advantage of for to make some code more concise. So instead of this:

(map cause-partial (take-while #(not (nil? %)) causes))

You could write:

(for [c clauses :while c]
  [:div.clause ...])

And do away with the separate cause-partial function.

@youngnh

made the changes (thanks for the guidance!), will open a new pull request

@youngnh youngnh closed this Apr 12, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment