2015-09-07 11:44:36 -06:00
|
|
|
// exceptions/ExceptionSilencer.java
|
2015-06-15 17:47:35 -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;
|
|
|
|
}
|
|
|
|
}
|
2015-09-07 11:44:36 -06:00
|
|
|
}
|
|
|
|
/* Output: (None) */
|