Commit acede980 authored by yanzg's avatar yanzg

工具类

parent 98e3475b
package com.yanzuoguang.util.helper;
import com.yanzuoguang.util.contants.ResultConstants;
import com.yanzuoguang.util.exception.CodeException;
import java.text.ParseException;
......@@ -261,10 +262,20 @@ public final class CheckerHelper {
/**
* 检测结果是否异常
*/
public void checkException() {
public CheckerHelper checkException() {
return checkException(null);
}
/**
* 检测结果是否异常
*
* @param target 目标数据类
*/
public CheckerHelper checkException(Object target) {
if (!StringHelper.isEmpty(this.checkResult)) {
throw new CodeException(this.checkResult);
throw new CodeException(ResultConstants.PARAM_INVALID, this.checkResult, target);
}
return this;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment