This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes what is a stack trace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is a stack trace" Watch "what is a stack trace" New topic
Author

what is a stack trace

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

what is a stack trace is it a method in some class???


http://www.lifesbizzare.blogspot.com || OCJP:81%
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

A stack trace is a listing of the method that's running, and the method that called it, and the method that called that one, etc. It's what you see if have an uncaught exception. You can print one yourself by including a line of code like this:

new Exception().printStackTrace();

It's extremely handy for debugging because it often contains line numbers.


[Jess in Action][AskingGoodQuestions]
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

thank you Mr. Ernest Friedman-Hill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: what is a stack trace
 
Similar Threads
NullpointerExceptin while creating rootPOA
Writing a file to unix directory
How to create a file in specified directory
Why exception on setting bouncycastle as provider #1 in the java.security
illegalArgumentException, HSQLDB, and Hibernate