Thanks for the pointer....

Different strokes for different folks, I guess.  Any time I've had a  
tool try to be smart with what error information is being provided, I  
end up discovering that an important tidbit was being elided (usually  
for some hours while tracking down a bug).  Exceptions are (or should  
be) exceptional, so I've never thought that reading them was onerous.

Of course, it's entirely possible that my stuff may fall out of the  
"for most apps" category more often than most? :-)

- Chas

On Feb 11, 2009, at 12:25 AM, Tom Faulhaber wrote:

>
> So rather than choosing between a stack depth and scanning through
> noise, it might be better to just filter out the (obvious) noise. This
> includes stuff that's down in the runtime (for most apps) and stuff
> that is up above the test.
>
> Shane Celis used that approach in his unit_test library. I forked and
> updated it to a little more modern Clojure and I have been very happy
> with it. The relevant code is here: http://gist.github.com/61846 and
> the full project is here: http://github.com/tomfaulhaber/unit_test/
>
> This solves the problem of trying to figure out the "right" depth.
> Plus even if you figure out the right depth, you still usually end up
> with a lot of garbage on the top of your stack. I've found that a
> little simple filtering makes the traces *much* more readable.
>
> Tom
>
> On Feb 10, 7:01 pm, Chas Emerick <cemer...@snowtide.com> wrote:
>> On Feb 10, 2009, at 8:52 PM, Stuart Sierra wrote:
>>
>>> Ok, new behavior in SVN rev. 449:  Full stack traces are printed by
>>> default.  Bind *stack-trace-depth* to an integer to limit the depth.
>>
>> That's great, Stuart, thank you very much.
>>
>>>> On Feb 10, 2:01 pm, Jeffrey Straszheim  
>>>> <straszheimjeff...@gmail.com>
>>>> wrote:
>>
>>>>> I've found that, in general, the stack dumps you get back from
>>>>> Java (into
>>>>> Clojure-land) are pretty unhelpful.
>>
>>>> I found that at first too, before someone showed me that you often
>>>> have to look at the nested "cause" ((.getCause e), I think) of the
>>>> exception, sometimes 5-10 layers deep, to see the real problem.  It
>>>> is
>>>> almost always buried in there somewhere.
>>
>> Absolutely true -- there's often lots of noise in stack traces, but
>> there's gems in there if you're willing to scan through them (and  
>> once
>> you get the hang of it, your eyeballs learn how to ignore the noise).
>> Just FWIW, we only use test-is in an automated test context that is
>> bootstrapped by ant and hudson, so the full stack traces really need
>> to be in the logs anyway in order for the testing to be maximally
>> useful.
>>
>> - Chas
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to