程序包 org.xmeta.util

类 ExceptionUtil

java.lang.Object
org.xmeta.util.ExceptionUtil

public class ExceptionUtil extends Object
  • 构造器详细资料

    • ExceptionUtil

      public ExceptionUtil()
  • 方法详细资料

    • getRootMessage

      public static String getRootMessage(Throwable t)
      获取第一个Cause的消息。 有时候异常被捕获的多次并包装了多次,取第一个原始的异常信息。
      参数:
      t - 异常
      返回:
      异常的字符串
    • getRootCause

      public static Throwable getRootCause(Throwable t)
      返回异常的根异常。
      参数:
      t - 异常
      返回:
      最初始的根异常
    • getCause

      public static Throwable getCause(Throwable t)
    • toString

      public static String toString(Throwable t)