• Post Reply Bookmark Topic Watch Topic
  • New Topic

Should be easy, but need help.

 
Rob Levo
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need to write the result of printStackTrace method of the Exception class to a file.
Can someone provide an example. I am getting confused on what I/O classes to use.
Thanks,
Rob
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

or

If you wish to do anything with the stack trace other than write it to a file, you can convert it to a String:

And if you're using 1.4 (and why not?) you can use other methods:
 
Rob Levo
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jim Yingst:

or

If you wish to do anything with the stack trace other than write it to a file, you can convert it to a String:

And if you're using 1.4 (and why not?) you can use other methods:

Thanks for your quick and comprehensive reply that includes the 1.4 fuctionality.
Take care,
Rob
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!