Class GracefulResponse

java.lang.Object
com.feiniaojin.gracefulresponse.GracefulResponse

public class GracefulResponse extends Object
GracefulResponse工具类
  • Constructor Details

    • GracefulResponse

      public GracefulResponse()
  • Method Details

    • raiseException

      public static void raiseException(String code, String msg)
      需要抛自定义异常时,调用该方法
      Parameters:
      code - 异常码
      msg - 异常提示
    • raiseException

      public static void raiseException(String code, String msg, Throwable throwable)
      需要抛自定义异常时,调用该方法
      Parameters:
      code - 异常码
      msg - 异常提示
      throwable - 捕获的异常
    • wrapAssert

      public static void wrapAssert(AssertFunction assertFunction)
    • wrapAssert

      public static void wrapAssert(String code, AssertFunction assertFunction)