Modifier and Type | Class and Description |
---|---|
static class |
Exceptions.Builder<T extends Throwable> |
Constructor and Description |
---|
Exceptions() |
Modifier and Type | Method and Description |
---|---|
static Exceptions.Builder<RuntimeException> |
newRutime(String message,
Object... args) |
static RuntimeException |
unchecked(Throwable e)
Rethrows a checked exception as unchecked exception.
|
public static Exceptions.Builder<RuntimeException> newRutime(String message, Object... args)
public static RuntimeException unchecked(Throwable e)
RuntimeException
.
This method never returns. Nevertheless, it specifies a return type so it can be invoked as
throw unchecked(e)
in contexts where an exception type is syntactically required
(e.g. when the enclosing method is non-void).