柯桥增值式服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.0KB

  1. package com.ningdatech.kqapi.common.exception;
  2. import com.ningdatech.kqapi.common.exception.code.ExceptionCode;
  3. /**
  4. * 业务参数异常
  5. * 用于在业务中,检测到非法参数时,进行抛出的异常。
  6. *
  7. * @author WendyYang
  8. * @version 3.5.0
  9. */
  10. public class ArgumentException extends BaseUncheckedException {
  11. private static final long serialVersionUID = -3843907364558373817L;
  12. public ArgumentException(Throwable cause) {
  13. super(cause);
  14. }
  15. public ArgumentException(String message) {
  16. super(ExceptionCode.BASE_VALID_PARAM.getCode(), message);
  17. }
  18. public ArgumentException(String message, Throwable cause) {
  19. super(ExceptionCode.BASE_VALID_PARAM.getCode(), message, cause);
  20. }
  21. public ArgumentException(final String format, Object... args) {
  22. super(ExceptionCode.BASE_VALID_PARAM.getCode(), format, args);
  23. }
  24. @Override
  25. public String toString() {
  26. return "ArgumentException [message=" + getMessage() + ", code=" + getCode() + "]";
  27. }
  28. }