APIException.java 530 B

123456789101112131415161718192021222324
  1. package com.huimv.manage.exception;
  2. import lombok.Getter;
  3. /**
  4. * @Project : huimv.shiwan
  5. * @Package : com.huimv.biosafety.uface.controller
  6. * @Description : TODO
  7. * @Version : 1.0
  8. * @Author : ZhuoNing
  9. * @Create : 2020-12-25
  10. **/
  11. @Getter
  12. public class APIException extends RuntimeException{
  13. private int code;
  14. private String msg;
  15. public APIException() {
  16. this(ResultCode.FAILED);
  17. }
  18. public APIException(ResultCode failed) {
  19. this.code=failed.getCode();
  20. this.msg=failed.getMsg();
  21. }
  22. }