public class Exceptions extends Object
Modifier and Type | Method and Description |
---|---|
static String |
briefOneLineStackTraceInformation(Predicate<StackTraceElement> toInclude)
Deprecated.
|
static String |
briefOneLineStackTraceInformation(org.neo4j.function.Predicate<StackTraceElement> toInclude) |
static Predicate<StackTraceElement> |
classImplementingInterface(Class<org.neo4j.kernel.impl.locking.Locks.Client> cls)
Deprecated.
|
static <E extends Throwable> |
combine(E first,
E second) |
static boolean |
contains(Throwable cause,
Class... anyOfTheseClasses) |
static boolean |
contains(Throwable cause,
Predicate<Throwable> toLookFor)
Deprecated.
|
static boolean |
contains(Throwable cause,
org.neo4j.function.Predicate<Throwable> toLookFor) |
static boolean |
contains(Throwable cause,
String containsMessage,
Class... anyOfTheseClasses) |
static boolean |
containsStackTraceElement(Throwable cause,
Predicate<StackTraceElement> predicate)
Deprecated.
|
static Predicate<Throwable> |
exceptionsOfType(Class<? extends Throwable>... types)
Deprecated.
use
Predicates.instanceOfAny(Class[]) instead |
static Predicate<Throwable> |
exceptionWithMessage(String message)
Deprecated.
|
static Predicate<StackTraceElement> |
forMethod(String name)
Deprecated.
|
static Predicate<Throwable> |
isAnyOfClasses(Class... anyOfTheseClasses)
Deprecated.
use
Predicates.instanceOfAny(Class[]) instead |
static <T extends Throwable> |
launderedException(Class<T> type,
String messageForUnexpected,
Throwable exception) |
static <T extends Throwable> |
launderedException(Class<T> type,
Throwable exception) |
static RuntimeException |
launderedException(String messageForUnexpected,
Throwable exception) |
static RuntimeException |
launderedException(Throwable exception) |
static Throwable |
peel(Throwable exception,
Predicate<Throwable> toPeel)
Deprecated.
use
peel(Throwable, org.neo4j.function.Predicate) instead |
static Throwable |
peel(Throwable exception,
org.neo4j.function.Predicate<Throwable> toPeel)
Peels off layers of causes.
|
static Throwable |
rootCause(Throwable caughtException) |
static String |
stringify(Thread thread,
StackTraceElement[] elements) |
static String |
stringify(Throwable cause) |
static <T extends Throwable> |
withCause(T exception,
Throwable cause) |
static <T extends Throwable> |
withMessage(T cause,
String message) |
static <T extends Throwable> |
withSuppressed(T exception,
Throwable... suppressed) |
public static <T extends Throwable> T withSuppressed(T exception, Throwable... suppressed)
public static RuntimeException launderedException(Throwable exception)
public static RuntimeException launderedException(String messageForUnexpected, Throwable exception)
public static <T extends Throwable> T launderedException(Class<T> type, Throwable exception)
public static <T extends Throwable> T launderedException(Class<T> type, String messageForUnexpected, Throwable exception)
@Deprecated public static Throwable peel(Throwable exception, Predicate<Throwable> toPeel)
peel(Throwable, org.neo4j.function.Predicate)
insteadexception
- the outer exception to peel to get to an delegate cause.toPeel
- Predicate
for deciding what to peel. true
means
to peel (i.e. remove), whereas the first false
means stop and return.public static Throwable peel(Throwable exception, org.neo4j.function.Predicate<Throwable> toPeel)
exception
- the outer exception to peel to get to an delegate cause.toPeel
- Predicate
for deciding what to peel. true
means
to peel (i.e. remove), whereas the first false
means stop and return.@Deprecated public static Predicate<Throwable> exceptionsOfType(Class<? extends Throwable>... types)
Predicates.instanceOfAny(Class[])
insteadtypes
- the exception types to check againstThrowable
is among the given types@Deprecated public static Predicate<Throwable> exceptionWithMessage(String message)
public static String stringify(Thread thread, StackTraceElement[] elements)
public static boolean contains(Throwable cause, String containsMessage, Class... anyOfTheseClasses)
@Deprecated public static boolean contains(Throwable cause, Predicate<Throwable> toLookFor)
contains(Throwable, org.neo4j.function.Predicate)
insteadcause
- the cause we havetoLookFor
- predicate for the cause we are looking fortrue
if the cause was foundpublic static boolean contains(Throwable cause, org.neo4j.function.Predicate<Throwable> toLookFor)
@Deprecated public static Predicate<Throwable> isAnyOfClasses(Class... anyOfTheseClasses)
Predicates.instanceOfAny(Class[])
insteadanyOfTheseClasses
- classes to match againsttrue
if an item is an instance of any of the given classespublic static <E extends Throwable> E combine(E first, E second)
@Deprecated public static Predicate<StackTraceElement> classImplementingInterface(Class<org.neo4j.kernel.impl.locking.Locks.Client> cls)
@Deprecated public static boolean containsStackTraceElement(Throwable cause, Predicate<StackTraceElement> predicate)
@Deprecated public static Predicate<StackTraceElement> forMethod(String name)
@Deprecated public static String briefOneLineStackTraceInformation(Predicate<StackTraceElement> toInclude)
briefOneLineStackTraceInformation(org.neo4j.function.Predicate)
insteadtoInclude
- predicate which decides which stack trace elements to includepublic static String briefOneLineStackTraceInformation(org.neo4j.function.Predicate<StackTraceElement> toInclude)
Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.