Class ExceptionUtils


  • public class ExceptionUtils
    extends java.lang.Object
    Utility class for exception formatting.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getStackTrace​(java.lang.Throwable throwable, java.lang.Throwable baseThrowable)
      Get stack trace of the throwable excluding the stack trace of the base throwable.
      static java.lang.String getStackTrace​(java.lang.Throwable throwable, java.lang.Throwable baseThrowable, boolean preserveCause)
      Get stack trace of the throwable excluding the stack trace of the base throwable.
      • Methods inherited from class java.lang.Object

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

      • getStackTrace

        public static java.lang.String getStackTrace​(java.lang.Throwable throwable,
                                                     java.lang.Throwable baseThrowable,
                                                     boolean preserveCause)
        Get stack trace of the throwable excluding the stack trace of the base throwable.
        Parameters:
        throwable - Throwable to get stack trace from
        baseThrowable - Throwable to exclude stack trace from
        preserveCause - Preserve cause in the stack trace
        Returns:
        Formatted stack trace
      • getStackTrace

        public static java.lang.String getStackTrace​(java.lang.Throwable throwable,
                                                     java.lang.Throwable baseThrowable)
        Get stack trace of the throwable excluding the stack trace of the base throwable.
        Parameters:
        throwable - Throwable to get stack trace from
        baseThrowable - Throwable to exclude stack trace from
        Returns:
        Formatted stack trace