@GwtCompatible public class Exceptions extends Object
| Constructor and Description |
|---|
Exceptions() |
| Modifier and Type | Method and Description |
|---|---|
static RuntimeException |
sneakyThrow(Throwable t)
Throws the given exception and sneaks it through any compiler checks.
|
public static RuntimeException sneakyThrow(Throwable t)
throw sneakyThrow(new CheckedException("Catch me if you can ;-)")).
This method is heavily inspired by project
Lombok.t - the throwable that should be sneaked through compiler checks. May not be null.t is always thrown.NullPointerException - if t is null.Copyright © 2015. All Rights Reserved.