public class ExceptionUtils extends Object
Constructor and Description |
---|
ExceptionUtils() |
Modifier and Type | Method and Description |
---|---|
static Throwable |
getRootCause(Throwable throwable)
Introspects the
Throwable to obtain the root cause. |
public static Throwable getRootCause(Throwable throwable)
Throwable
to obtain the root cause.
This method walks through the exception chain to the last element, "root" of the tree, using
Throwable.getCause()
, and returns that exception.
throwable
- the throwable to get the root cause for, may be nullThrowable
, null
if null throwable inputCopyright © 2012–2023 OpenFeign. All rights reserved.