Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

do I have to recover the Interrupted Exception  RSS feed

 
ken bonzo
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

do we have to recover the InterruptedException?
I do not call the interrupt method at all

Regards
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your application may not be interrupting the threads directly, but InterruptedException is a checked exception, so you will have to deal with it.

I guess you refer to the locking mechanism . There, if an InterruptedException happens, I am throwing a RecordNotFoundException with a message like "The record could not be found because the locking process was interrupted".
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!