• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Should be easy, but need help.

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic