柯桥增值式服务
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.

UnauthorizedException.java 833B

123456789101112131415161718192021222324252627282930313233
  1. package com.ningdatech.kqapi.common.exception;
  2. import com.ningdatech.kqapi.common.exception.code.ExceptionCode;
  3. /**
  4. * 401 未认证 未登录
  5. *
  6. * @author WendyYang
  7. * @version 1.0
  8. */
  9. public class UnauthorizedException extends BaseUncheckedException {
  10. private static final long serialVersionUID = 1L;
  11. public UnauthorizedException(int code, String message) {
  12. super(code, message);
  13. }
  14. public UnauthorizedException(int code, String message, Throwable cause) {
  15. super(code, message, cause);
  16. }
  17. public static UnauthorizedException wrap(String msg) {
  18. return new UnauthorizedException(ExceptionCode.UNAUTHORIZED.getCode(), msg);
  19. }
  20. @Override
  21. public String toString() {
  22. return "UnauthorizedException [message=" + getMessage() + ", code=" + getCode() + "]";
  23. }
  24. }