Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Throwable.getSupprssed()  RSS feed

 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

java.io.FileNotFoundException

Why i ain't getting any output for tt ?
 
Campbell Ritchie
Sheriff
Posts: 53764
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read what Throwable#getSuppressed() actually does?
 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it should print IOException that is suppressed in my program.
 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 3201
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you read this article on suppressed exception handling.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!