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 into a single-line message. Nested causes are appended with ": " so the result stays readable when serialized in JSON (no embedded newlines).
      Parameters:
      throwable - the exception
      Returns:
      full message