R
R
Rocket-API
Search…
自定义Assert函数异常输出
实现接口 com.github.alenfive.rocketapi.extend.IAssertException
1
/**
2
* 默认参数验证异常处理类
3
*/
4
@Component
5
public class DefaultAssertException implements IAssertException {
6
7
@Override
8
public void exception(String... input) {
9
if (input.length != 1){
10
throw new RuntimeException("Parameter length mismatch" + input.toString());
11
}
12
throw new RuntimeException(input[0]);
13
}
14
}
Copied!
Last modified 1yr ago
Copy link