| Modifier and Type | Method and Description |
|---|---|
static <E extends RuntimeException> |
createException(Class<E> type,
String message,
Throwable cause)
Throws an exception with the specified message and cause.
|
static void |
filterStacktrace(Throwable throwable,
Predicate<String> classNameFilter)
Runs a predicate against all lines of a stacktrace removing lines at or above those that match.
|
public static <E extends RuntimeException> RuntimeException createException(Class<E> type, String message, Throwable cause)
E - the type of the exceptiontype - the type of the exceptionmessage - an explanation of what went wrongcause - the cause of the exceptionpublic static void filterStacktrace(Throwable throwable, Predicate<String> classNameFilter)
This method can be used to remove lines that hold little value for the end user (such as internal methods invoked by this library).
throwable - the Throwable to processclassNameFilter - returns true if stack-trace elements should be removed at and above the
current positionCopyright © 2016. All rights reserved.