public class ExceptionUtil extends Object
| 构造器和说明 |
|---|
ExceptionUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getStackTraceString(Throwable tr) |
static <T extends Throwable> |
throwAsUncheck(Throwable t) |
static <T extends Throwable,R> |
throwIt(T t) |
static <E extends Throwable> |
throwToReturn(RunnableThrow<E> task) |
static <T,E extends Exception> |
throwToReturn(SupplierThrow<T,E> task) |
static boolean |
uncatch(RunnableThrow<?> task) |
static <T> T |
uncatch(SupplierThrow<T,?> task) |
static void |
uncheck(RunnableThrow<?> task) |
static <T> T |
uncheck(SupplierThrow<T,?> task) |
public static <T extends Throwable,R> R throwIt(T t) throws T extends Throwable
T extends Throwablepublic static <T extends Throwable> void throwAsUncheck(Throwable t) throws T extends Throwable
T extends Throwablepublic static void uncheck(RunnableThrow<?> task)
public static <T> T uncheck(SupplierThrow<T,?> task)
public static boolean uncatch(RunnableThrow<?> task)
public static <T> T uncatch(SupplierThrow<T,?> task)
task - public static <E extends Throwable> Optional<E> throwToReturn(RunnableThrow<E> task)
public static <T,E extends Exception> Either<T,E> throwToReturn(SupplierThrow<T,E> task)
Copyright © 2017. All rights reserved.