Class ExceptionUtils

java.lang.Object
com.tridion.util.ExceptionUtils

public final class ExceptionUtils extends Object
The ExceptionUtils class provides useful methods for working with Exceptions.
  • Method Details

    • getMessageAndStackTrace

      public static String getMessageAndStackTrace(Throwable throwable)
      Creates a string representation of the exception. If no message is available, only the string representation of the stacktrace will be returned.
      Parameters:
      throwable - The Throwable that should be converted to a String.
      Returns:
      a String representation of the Throwable.
    • getStackTrace

      public static String getStackTrace(Throwable throwable)
      Creates a string representation of the stacktrace of the throwable.
      Parameters:
      throwable - The Throwable for which the stacktrace should be converted to a String.
      Returns:
      a String representation of the stacktrace of the Throwable.
    • getAppropriateTridionCause

      public static Throwable getAppropriateTridionCause(Throwable throwable)
      This method loops all inner most causes and returns first throwable object.
      Parameters:
      throwable - The throwable for which it should get deepest cause.
      Returns:
      inner most throwable object