Class ExceptionUtils


  • public final class ExceptionUtils
    extends Object
    This utils contains exception utilities.
    Since:
    1.0.0
    Author:
    Shashank Agrawal, Ritesh Sinha
    • Method Detail

      • buildMessage

        public static String buildMessage​(String message,
                                          Throwable cause)
        Returns an String object that can be used after building the exception stack trace.
        Parameters:
        message - the exception message
        cause - the cause
        Returns:
        the exception stack
      • getStackTrace

        public static String getStackTrace​(Throwable throwable)
        This method returns the stack trace
        Parameters:
        throwable - the exception to be added to the list of exception
        Returns:
        the stack trace
      • getServiceErrorList

        public static List<ServiceError> getServiceErrorList​(String responseBody)
        This method gives service error list for response receive from service.
        Parameters:
        responseBody - the service response body.
        Returns:
        the list of ServiceError
      • logRootCause

        public static void logRootCause​(Throwable exception)