Class NestedExceptionUtils


  • public abstract class NestedExceptionUtils
    extends java.lang.Object
    Helper 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
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Throwable getRootCause​(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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NestedExceptionUtils

        public NestedExceptionUtils()
    • 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