Propagates throwable exactly as-is, if and only if it is an instance of RuntimeException or Error. Example usage: try { someMethodThatCouldThrowAnything(); } catch (IKnowWhatToDoWithThisException e) { handle(e); } catch (Throwable t) { Throwables.propagateIfPossi
(@Nullable Throwable throwable)
| 159 | */ |
| 160 | |
| 161 | @Deprecated |
| 162 | @GwtIncompatible |
| 163 | public static void propagateIfPossible(@Nullable Throwable throwable) { |
| 164 | if (throwable != null) { |
| 165 | throwIfUnchecked(throwable); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * Propagates {@code throwable} exactly as-is, if and only if it is an instance of |
no test coverage detected