Skip to content

Commit

Permalink
remove ParamException
Browse files Browse the repository at this point in the history
  • Loading branch information
fulan.zjf committed Jan 13, 2019
1 parent 47c1bfa commit 1331ddf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.alibaba.cola.command.CommandInterceptorI;
import com.alibaba.cola.command.PreInterceptor;
import com.alibaba.cola.dto.Command;
import com.alibaba.cola.exception.ParamException;
import com.alibaba.cola.exception.BizException;
import com.alibaba.cola.validator.ColaMessageInterpolator;
import org.hibernate.validator.HibernateValidator;

Expand All @@ -33,7 +33,7 @@ public void preIntercept(Command command) {
Validator validator = factory.getValidator();
Set<ConstraintViolation<Command>> constraintViolations = validator.validate(command);
constraintViolations.forEach(violation -> {
throw new ParamException(violation.getPropertyPath() + " " + violation.getMessage());
throw new BizException(violation.getPropertyPath() + " " + violation.getMessage());
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import ${package}.common.BizCode;
import ${package}.dto.CustomerAddCmd;
import ${package}.validator.CustomerAddValidator;
import com.alibaba.cola.exception.ParamException;
import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.cola.extension.Extension;
Expand All @@ -18,7 +17,7 @@

/**
* CustomerAddDDValidator
*
*
* @author fulan.zjf 2017-11-04
*/
@Extension(bizCode = BizCode.BIZ_TWO)
Expand Down

0 comments on commit 1331ddf

Please sign in to comment.