Re: Column numbers in stack trace - enhancement request



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
.



Relevant Pages

  • Re: Column numbers in stack trace - enhancement request
    ... Synopsis: Need column numbers in stack traces ... A DESCRIPTION OF THE REQUEST: ... Stack traces contain only line numbers and in certain cases line number ... sufficiently helpful in narrowing down the problem. ...
    (comp.lang.java.programmer)
  • Re: Column numbers is stack trace - enhancement request
    ... opinion about how useful implementing this feature would be. ... Synopsis: Need column numbers in stack traces ... Stack traces contain only line numbers and in certain cases line number ... sufficiently helpful in narrowing down the problem. ...
    (comp.lang.java.programmer)
  • Column numbers in stack trace - enhancement request
    ... I filed the following enhancement request to Sun. ... Synopsis: Need column numbers in stack traces ... Stack traces contain only line numbers and in certain cases line number ... sufficiently helpful in narrowing down the problem. ...
    (comp.lang.java.programmer)
  • Column numbers is stack trace - enhancement request
    ... I filed the following enhancement request to Sun. ... Synopsis: Need column numbers in stack traces ... Stack traces contain only line numbers and in certain cases line number ... sufficiently helpful in narrowing down the problem. ...
    (comp.lang.java.programmer)
  • Re: Insecure XML-RPC handling in Zope reveals the distribution physic al location.
    ... > A request like the quoted below will cause Zope to produce stack traces in ... > the response that will reveal the information mentioned above. ...
    (Bugtraq)