• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Throwable.getSupprssed()

 
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
Pie
Posts: 49864
70
  • 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: 2973
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you read this article on suppressed exception handling.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic