新增APP版本异常
This commit is contained in:
parent
d5cd78edea
commit
71b286f67d
@ -50,6 +50,8 @@ public class ResponseAdvice {
|
|||||||
result.setCode(ErrorResultCodeEnum.FILE_ERROR.getValue());
|
result.setCode(ErrorResultCodeEnum.FILE_ERROR.getValue());
|
||||||
} else if (e instanceof AppDeviceException) {
|
} else if (e instanceof AppDeviceException) {
|
||||||
result.setCode(ErrorResultCodeEnum.DEVICE_ERROR.getValue());
|
result.setCode(ErrorResultCodeEnum.DEVICE_ERROR.getValue());
|
||||||
|
} else if (e instanceof AppVersionException) {
|
||||||
|
result.setCode(ErrorResultCodeEnum.DEVICE_VERSION_ERROR.getValue());
|
||||||
} else if (e instanceof AccessTokenException) {
|
} else if (e instanceof AccessTokenException) {
|
||||||
response.setStatus(HttpStatus.UNAUTHORIZED.value());
|
response.setStatus(HttpStatus.UNAUTHORIZED.value());
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,8 @@ public enum ErrorResultCodeEnum {
|
|||||||
USERNAME_PASSWORD_ERROR(40303),
|
USERNAME_PASSWORD_ERROR(40303),
|
||||||
USER_EXIST(40304),
|
USER_EXIST(40304),
|
||||||
PERMISSION_ERROR(40401),
|
PERMISSION_ERROR(40401),
|
||||||
DEVICE_ERROR(40501);
|
DEVICE_ERROR(40501),
|
||||||
|
DEVICE_VERSION_ERROR(40502);
|
||||||
|
|
||||||
private int value;
|
private int value;
|
||||||
|
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.cm.common.exception;
|
||||||
|
|
||||||
|
import com.cm.common.exception.base.SystemException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When you feel like quitting. Think about why you started
|
||||||
|
* 当你想要放弃的时候,想想当初你为何开始
|
||||||
|
*
|
||||||
|
* @ClassName: AppVersionException
|
||||||
|
* @Description: app版本异常
|
||||||
|
* @Author: WangGeng
|
||||||
|
* @Date: 2019/9/19 5:47 下午
|
||||||
|
* @Version: 1.0
|
||||||
|
**/
|
||||||
|
public class AppVersionException extends SystemException {
|
||||||
|
|
||||||
|
public AppVersionException() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public AppVersionException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AppVersionException(String message, boolean withMsg) {
|
||||||
|
super(message, withMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AppVersionException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AppVersionException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user