How can I get Nested Exceptions to show me the full stack trace, instead of truncating them with "... N more"?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alex_Chaffee
Posted On:   Saturday, March 15, 2003 07:24 AM

Nested exceptions are great. Recursive stack traces are great. Truncating them so they don't scroll up forever is a worthy try. But the algorithm by which an exception decides exactly where to truncate is inscrutable, and it often guesses wrong. One recent example: I had a nested NullPointerException inside an accessor. The printed stack trace aggressively truncated this trace so all I saw was the line inside the accessor where the null pointer was dereferenced, followed by "...42 more". This did not provide me with any context as to where the null pointer was *set* in the first place. Someone has recently reported this as a bug. Please come vote for it at http://developer.java.sun.com/developer/bugPara   More>>

Nested exceptions are great. Recursive stack traces are great. Truncating them so they don't scroll up forever is a worthy try. But the algorithm by which an exception decides exactly where to truncate is inscrutable, and it often guesses wrong.


One recent example: I had a nested NullPointerException inside an accessor. The printed stack trace aggressively truncated this trace so all I saw was the line inside the accessor where the null pointer was dereferenced, followed by "...42 more". This did not provide me with any context as to where the null pointer was *set* in the first place.


Someone has recently reported this as a bug. Please come vote for it at http://developer.java.sun.com/developer/bugParade/index.jshtml

   <<Less
About | Sitemap | Contact