Class ExceptionUtil

java.lang.Object
io.quarkus.runtime.util.ExceptionUtil

public class ExceptionUtil extends Object
  • Constructor Details

    • ExceptionUtil

      public ExceptionUtil()
  • Method Details

    • generateStackTrace

      public static String generateStackTrace(Throwable exception)
      Returns the string representation of the stacktrace of the passed exception
      Parameters:
      exception -
      Returns:
    • rootCauseFirstStackTrace

      public static String rootCauseFirstStackTrace(Throwable exception)
      Returns an "upside down" stacktrace of the exception with the root cause showing up first in the stacktrace. Note: This is a relatively expensive method because it creates additional exceptions and manipulates their stacktrace. Care should be taken to determine whether usage of this method is necessary.
      Parameters:
      exception - The exception
      Returns:
    • getRootCause

      public static Throwable getRootCause(Throwable exception)