public class Exceptions extends Object
| Constructor and Description |
|---|
Exceptions() |
| Modifier and Type | Method and Description |
|---|---|
static <E extends Exception> |
throwIfInstance(Throwable t,
Class<E> excClass)
If the given throwable is an instance of E, throw it as an E.
|
public static <E extends Exception> void throwIfInstance(Throwable t, Class<E> excClass) throws E extends Exception
E - the type of exception that will be thrown if throwable is an instancet - an exception instanceexcClass - an exception class t may be an instance ofE - if t is an instance of EE extends ExceptionCopyright © 2018 The Apache Software Foundation. All rights reserved.