@Immutable public class Throwables extends Object
Throwables.| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(Throwable thiz,
Throwable that)
|
static <T extends Throwable> |
wrap(T ex)
Wraps the given throwable in a new instance of the same class if
possible.
|
public static boolean contains(Throwable thiz, Throwable that)
thiz - the throwable to search for that throwable.that - the throwable to look up.true if and only if thiz is identical to
that or has been (recursively) caused by it.public static <T extends Throwable> T wrap(T ex)
T - the compile time type of the throwable to return.ex - the throwable to wrap in a new instance of the same class.t
with its cause initialized to
t or simply t if the wrapping fails due to
another exception.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.