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 Throwable.getSupprssed() 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 "Throwable.getSupprssed()" Watch "Throwable.getSupprssed()" New topic
Author

Throwable.getSupprssed()

meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305


java.io.FileNotFoundException

Why i ain't getting any output for tt ?


My one regret in life is that I am not someone else.
- Woody Allen
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37890
    
  22
Have you read what Throwable#getSuppressed() actually does?
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

Yes, it should print IOException that is suppressed in my program.
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305


java.sql.SQLException

I have modified program.There is no "foo.in" file in my currentdirectory so there would be a FileNotFoundException cause by resources statement and getSuppressed() should get it, but didn't get any success. any help ?
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2161
    
  47
I suggest you read this article on suppressed exception handling.
 
jQuery in Action, 2nd edition
 
subject: Throwable.getSupprssed()
 
Similar Threads
SuppressedException
Exception
practice question: what is the output:
can you teach me " this " keywords second use ?
Exception