Manipulando InterruptedException em Java
Qual é a diferença entre as seguintes formas de manuseioInterruptedException
? Qual é a melhor maneira de fazer isso?
try{
//...
} catch(InterruptedException e) {
Thread.currentThread().interrupt();
}
OU
try{
//...
} catch(InterruptedException e) {
throw new RuntimeException(e);
}
EDIT: Gostaria de saber também em quais cenários esses dois são usados.