Checks whether the supplied Throwable is one that needs to be rethrown and swallows all others. @param t the Throwable to check
(Throwable t)
| 37 | * @param t the Throwable to check |
| 38 | */ |
| 39 | public static void handleThrowable(Throwable t) { |
| 40 | if (t instanceof StackOverflowError) { |
| 41 | // Swallow silently - it should be recoverable |
| 42 | return; |
| 43 | } |
| 44 | if (t instanceof VirtualMachineError) { |
| 45 | throw (VirtualMachineError) t; |
| 46 | } |
| 47 | // All other instances of Throwable will be silently swallowed |
| 48 | } |
| 49 | |
| 50 | |
| 51 | /** |
no outgoing calls