Class ExceptionUtils

java.lang.Object
com.smeup.kokos.sdk.util.ExceptionUtils

public class ExceptionUtils extends Object
This class contains all exception util methods
  • Constructor Details

    • ExceptionUtils

      public ExceptionUtils()
  • Method Details

    • getRootCause

      public static Throwable getRootCause(Throwable throwable)
      Return the root cause of an exception
      Parameters:
      throwable -
      Returns:
    • concatenateAllCause

      public static String concatenateAllCause(Throwable throwable)
      Concatenate all cause of a Throwable. Each message is separated by a new line.
      Parameters:
      throwable - the exception
      Returns:
      full message
    • exceptionFunToMessage

      public static SmeupMessage exceptionFunToMessage(Exception e, Fun f) throws Exception
      Throws:
      Exception
    • exceptionToMessage

      public static SmeupMessage exceptionToMessage(Exception e) throws Exception
      Throws:
      Exception