Package com.feiniaojin.gracefulresponse
Class GracefulResponse
java.lang.Object
com.feiniaojin.gracefulresponse.GracefulResponse
GracefulResponse工具类
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidraiseException(String code, String msg) 需要抛自定义异常时,调用该方法static voidraiseException(String code, String msg, Throwable throwable) 需要抛自定义异常时,调用该方法static voidwrapAssert(AssertFunction assertFunction) static voidwrapAssert(String code, AssertFunction assertFunction)
-
Constructor Details
-
GracefulResponse
public GracefulResponse()
-
-
Method Details
-
raiseException
需要抛自定义异常时,调用该方法- Parameters:
code- 异常码msg- 异常提示
-
raiseException
需要抛自定义异常时,调用该方法- Parameters:
code- 异常码msg- 异常提示throwable- 捕获的异常
-
wrapAssert
-
wrapAssert
-