Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what is a stack trace  RSS feed

 
Vishal Hegde
Ranch Hand
Posts: 1078
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is a stack trace is it a method in some class???
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vishal Hegde
Ranch Hand
Posts: 1078
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Mr. Ernest Friedman-Hill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!