Package yakworks.problem.exception
Class NestedExceptionUtils
- java.lang.Object
-
- yakworks.problem.exception.NestedExceptionUtils
-
public abstract class NestedExceptionUtils extends java.lang.ObjectHelper class for implementing exception classes which are capable of holding nested exceptions. Necessary because we can't share a base class among different exception types.Mainly for use within the framework.
- Since:
- 2.0
- See Also:
NestedProblemException
-
-
Constructor Summary
Constructors Constructor Description NestedExceptionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.ThrowablegetRootCause(java.lang.Throwable original)Retrieve the innermost cause of the given exception Returns the original passed in exception if there is no root cause so this alway returns something.
-
-
-
Method Detail
-
getRootCause
@Nullable public static java.lang.Throwable getRootCause(@Nullable java.lang.Throwable original)Retrieve the innermost cause of the given exception Returns the original passed in exception if there is no root cause so this alway returns something. to check if it hsa a root cause then can just do getRootCause(ex) == ex
-
-