2015-04-20 15:36:01 -07:00
|
|
|
|
//: exceptions/ExceptionSilencer.java
|
2015-05-29 14:18:51 -07:00
|
|
|
|
// <20>2015 MindView LLC: see Copyright.txt
|
2015-04-20 15:36:01 -07:00
|
|
|
|
|
|
|
|
|
public class ExceptionSilencer {
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
try {
|
|
|
|
|
throw new RuntimeException();
|
|
|
|
|
} finally {
|
|
|
|
|
// Using 'return' inside the finally block
|
|
|
|
|
// will silence any thrown exception.
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} ///:~
|