新增APP版本异常

This commit is contained in:
wenc000 2019-09-19 23:17:15 +08:00
parent d5cd78edea
commit 71b286f67d
3 changed files with 40 additions and 1 deletions

View File

@ -50,6 +50,8 @@ public class ResponseAdvice {
result.setCode(ErrorResultCodeEnum.FILE_ERROR.getValue());
} else if (e instanceof AppDeviceException) {
result.setCode(ErrorResultCodeEnum.DEVICE_ERROR.getValue());
} else if (e instanceof AppVersionException) {
result.setCode(ErrorResultCodeEnum.DEVICE_VERSION_ERROR.getValue());
} else if (e instanceof AccessTokenException) {
response.setStatus(HttpStatus.UNAUTHORIZED.value());
}

View File

@ -26,7 +26,8 @@ public enum ErrorResultCodeEnum {
USERNAME_PASSWORD_ERROR(40303),
USER_EXIST(40304),
PERMISSION_ERROR(40401),
DEVICE_ERROR(40501);
DEVICE_ERROR(40501),
DEVICE_VERSION_ERROR(40502);
private int value;

View File

@ -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);
}
}