类 ScxExceptionHelper

java.lang.Object
cool.scx.util.exception.ScxExceptionHelper

public final class ScxExceptionHelper extends Object
a
版本:
0.0.1
作者:
scx567888
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static Throwable
    解包包装后的异常
    static String
    获取 jdk 内部默认实现的堆栈跟踪字符串
    static void
    ignore(cool.scx.functional.ScxHandlerE<?> handler)
    忽略异常
    static <T> T
    ignore(cool.scx.functional.ScxHandlerRE<T,?> handler)
    忽略异常 发生异常时返回 null
    static <T> T
    ignore(cool.scx.functional.ScxHandlerRE<T,?> handler, T defaultVal)
    忽略异常 发生异常时返回默认值
    static boolean
    noException(cool.scx.functional.ScxHandlerE<?> exceptionScxHandlerVE)
    执行的操作是否有异常 (有异常时不打印信息)
    static void
    wrap(cool.scx.functional.ScxHandlerE<?> handler)
    包装 异常
    static <T> T
    wrap(cool.scx.functional.ScxHandlerRE<T,?> handler)
    包装 异常

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • ScxExceptionHelper

      public ScxExceptionHelper()
  • 方法详细资料

    • wrap

      public static <T> T wrap(cool.scx.functional.ScxHandlerRE<T,?> handler)
      包装 异常
      类型参数:
      T - a
      参数:
      handler - a
      返回:
      a
    • wrap

      public static void wrap(cool.scx.functional.ScxHandlerE<?> handler)
      包装 异常
      参数:
      handler - a
    • ignore

      public static <T> T ignore(cool.scx.functional.ScxHandlerRE<T,?> handler)
      忽略异常 发生异常时返回 null
      类型参数:
      T - a
      参数:
      handler - a
      返回:
      a
    • ignore

      public static <T> T ignore(cool.scx.functional.ScxHandlerRE<T,?> handler, T defaultVal)
      忽略异常 发生异常时返回默认值
      类型参数:
      T - a
      参数:
      handler - a
      defaultVal - a T object
      返回:
      a
    • ignore

      public static void ignore(cool.scx.functional.ScxHandlerE<?> handler)
      忽略异常
      参数:
      handler - a
    • noException

      public static boolean noException(cool.scx.functional.ScxHandlerE<?> exceptionScxHandlerVE)
      执行的操作是否有异常 (有异常时不打印信息)
      参数:
      exceptionScxHandlerVE - a
      返回:
      a
    • getRootCause

      public static Throwable getRootCause(Throwable throwable)
      解包包装后的异常
      参数:
      throwable - a
      返回:
      a
    • getStackTraceString

      public static String getStackTraceString(Throwable throwable)
      获取 jdk 内部默认实现的堆栈跟踪字符串
      参数:
      throwable - t
      返回:
      t