public class ResultException extends RuntimeException
Constructor and Description |
---|
ResultException(int businessId,
Result<?> result) |
ResultException(int businessId,
String msg)
异常消息构造
|
ResultException(Result<?> result) |
ResultException(String msg)
异常消息构造
|
ResultException(String msg,
Object... values)
异常消息格式化构造
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ResultException(String msg)
public ResultException(String msg, Object... values)
R.errorPromptFormat(String, Object...) 的便捷方式
msg支持文本模板格式化,{} 表示占位符
例:("this is {} for {}", "a", "b") = this is a for b
msg
- 文本模板,被替换的部分用 {} 表示values
- 文本模板中占位符被替换的值public ResultException(Result<?> result)
public ResultException(int businessId, String msg)
public ResultException(int businessId, Result<?> result)
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.