public class ResultException extends RuntimeException
| 构造器和说明 |
|---|
ResultException(int businessId,
Result<?> result) |
ResultException(int businessId,
String msg)
异常消息构造
R.errorPrompt(String) 的便捷方式
|
ResultException(Result<?> result) |
ResultException(String msg)
异常消息构造
R.errorPrompt(String) 的便捷方式
|
ResultException(String msg,
Object... values)
异常消息格式化构造
R.errorPromptFormat(String, Object...)
|
public ResultException(String msg)
public ResultException(String msg, Object... values)
R.errorPromptFormat(String, Object...) 的便捷方式
msg支持文本模板格式化,{} 表示占位符
例:("this is {} for {}", "a", "b") = this is a for bmsg - 文本模板,被替换的部分用 {} 表示values - 文本模板中占位符被替换的值public ResultException(Result<?> result)
public ResultException(int businessId,
String msg)
public ResultException(int businessId,
Result<?> result)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.