Package com.imyeyu.java.bean.timi
Class TimiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.imyeyu.java.bean.timi.TimiException
- All Implemented Interfaces:
LanguageMsgMapping<TimiException>,Serializable
通用运行时异常,附加通用代码
- Since:
- 2021-05-20 15:18
- Author:
- 夜雨
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTimiException(TimiCode code) TimiException(TimiCode code, String msg) 构造器TimiException(TimiCode code, String msg, Throwable e) 构造器 -
Method Summary
Modifier and TypeMethodDescriptiongetCode()代码getMsg()获取消息获取附加插值参数获取消息多语言键设置消息设置消息多语言键设置消息多语言键并附加插值参数static <T> Tstatic <T> Tstatic <T> voidrequiredNull(T t, String message) static <T> voidrequiredNull(T t, String message, String msgKey) static voidrequiredTrue(boolean bool, String message) static voidrequiredTrue(boolean bool, String message, String msgKey) static voidrequiredTrue(CallbackReturn<Boolean> callback, String message) static voidrequiredTrue(CallbackReturn<Boolean> callback, String message, String msgKey) void设置消息void设置消息多语言键void设置消息多语言键并附加插值参数列表TimiResponse<?> Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
code
代码 -
msgKey
-
msgArgs
-
-
Constructor Details
-
TimiException
- Parameters:
code- 代码
-
TimiException
构造器- Parameters:
code- 代码msg- 消息
-
TimiException
构造器- Parameters:
code- 代码msg- 消息
-
-
Method Details
-
toResponse
-
msg
Description copied from interface:LanguageMsgMapping设置消息- Specified by:
msgin interfaceLanguageMsgMapping<TimiException>- Parameters:
msg- 消息- Returns:
- 原对象
-
msgKey
Description copied from interface:LanguageMsgMapping设置消息多语言键- Specified by:
msgKeyin interfaceLanguageMsgMapping<TimiException>- Parameters:
msgKey- 键- Returns:
- 原对象
-
msgKey
Description copied from interface:LanguageMsgMapping设置消息多语言键并附加插值参数- Specified by:
msgKeyin interfaceLanguageMsgMapping<TimiException>- Parameters:
msgKey- 键msgArgs- 插值参数- Returns:
- 原对象
-
setMsg
Description copied from interface:LanguageMsgMapping设置消息- Specified by:
setMsgin interfaceLanguageMsgMapping<TimiException>- Parameters:
msg- 消息
-
getMsg
Description copied from interface:LanguageMsgMapping获取消息- Specified by:
getMsgin interfaceLanguageMsgMapping<TimiException>- Returns:
- 消息
-
setMsgKey
Description copied from interface:LanguageMsgMapping设置消息多语言键- Specified by:
setMsgKeyin interfaceLanguageMsgMapping<TimiException>- Parameters:
msgKey- 键
-
setMsgKey
Description copied from interface:LanguageMsgMapping设置消息多语言键并附加插值参数列表- Specified by:
setMsgKeyin interfaceLanguageMsgMapping<TimiException>- Parameters:
msgKey- 键msgArgs- 插值参数
-
getMsgKey
Description copied from interface:LanguageMsgMapping获取消息多语言键- Specified by:
getMsgKeyin interfaceLanguageMsgMapping<TimiException>- Returns:
- 键
-
getMsgArgs
Description copied from interface:LanguageMsgMapping获取附加插值参数- Specified by:
getMsgArgsin interfaceLanguageMsgMapping<TimiException>- Returns:
- 附加插值参数列表
-
required
-
required
-
requiredNull
- Throws:
TimiException
-
requiredNull
- Throws:
TimiException
-
requiredTrue
- Throws:
TimiException
-
requiredTrue
- Throws:
TimiException
-
requiredTrue
public static void requiredTrue(CallbackReturn<Boolean> callback, String message) throws TimiException - Throws:
TimiException
-
requiredTrue
public static void requiredTrue(CallbackReturn<Boolean> callback, String message, String msgKey) throws TimiException - Throws:
TimiException
-
getCode
代码
-