Re: Column numbers in stack trace - enhancement request
- From: Patricia Shanahan <pats@xxxxxxx>
- Date: Tue, 16 Jan 2007 12:55:59 GMT
Sasi wrote:
I filed the following enhancement request to Sun. Would like to hear
opinion about how useful implementing this feature would be.
Synopsis: Need column numbers in stack traces
Description:
A DESCRIPTION OF THE REQUEST :
Stack traces contain only line numbers and in certain cases line number
alone is not sufficient for figuring out where exactly an exception
occurred. Consider the following line of code.
value = getItem().getRelatedItem().getName().getValue();
The general column number idea would be quite expensive, but there may
be a cheaper solution that would help this particular problem.
How about including in NullPointerException the compile time type of the
subexpression that was null? If getItem() and getRelatedItem() have the
same return type, it would not distinguish between them, but it would
distinguish between the two Item methods, and each of the other two methods.
That said, I tend to avoid chains like that anyway, because I like to
use local variable names as documentation.
Patricia
.
- Follow-Ups:
- Re: Column numbers in stack trace - enhancement request
- From: Chris Uppal
- Re: Column numbers in stack trace - enhancement request
- References:
- Prev by Date: Re: java class heirarchy matching?
- Next by Date: Re: sending Objects and Strings over TCP/IP
- Previous by thread: Re: Column numbers in stack trace - enhancement request
- Next by thread: Re: Column numbers in stack trace - enhancement request
- Index(es):
Relevant Pages
|