java stack trace annotation

By mccraig | Tuesday, October 24th, 2006

i’ve just spent an age tracking down a problem parsing an xml file with commons digester. it turned out to be because someone had missed an element out of the hierarchy, and digester was trying to call a method which didn’t exist because of that

tracking down the problem took ages because there is no information in java stack traces other than a list of method calls. if each method called had an ability to annotate the current stack frame with some application related information [ the name or path of the xml element currently being processed in this case ], then i wouldn’t have needed to fire up the debugger and manually correlate the stack trace with objects in the debugger

all that would be needed would be some method like :


This entry was posted on Tuesday, October 24th, 2006 at 8:23 am and is filed under Coding. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

New York Office
234 5th Avenue, 4th Floor
New York, NY
10001, USA

London Office
The Trampery
8-15 Dereham Place
London EC2A 3HJ
United Kingdom