com.gitee.cn9750wang.webtools.error.defines.ServerErr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of web-tools Show documentation
Show all versions of web-tools Show documentation
web tools for spring-boot web project
The newest version!
/*
* Copyright 2021 wwy
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitee.cn9750wang.webtools.error.defines;
import com.gitee.cn9750wang.webtools.error.ErrorCode;
import com.gitee.cn9750wang.webtools.vo.result.error.ErrorMessage;
import static com.gitee.cn9750wang.webtools.error.defines.Errors.S;
/**
* 服务器错误
* @author wwy
*/
public enum ServerErr implements ErrEnum{
/** 因不明原因导致服务器内部错误 */
SERVER_ERR(S,"因不明原因导致服务器内部错误"),
/** 功能未实现 */
NOT_IMPL(S.increase(1),"功能未实现"),
/** 网关服务器从远程服务器接收到了一个无效的响应,gateway:[%s],upstream:[%s] */
BAD_GATEWAY(S.increase(2),"网关服务器从远程服务器接收到了一个无效的响应,gateway:[%s],upstream:[%s]"),
/** 由于超载或系统维护,服务器暂时的无法处理客户端的请求,gateway:[%s],upstream:[%s] */
SERVICE_UNAVAILABLE(S.increase(3),"由于超载或系统维护,服务器暂时的无法处理客户端的请求,gateway:[%s],upstream:[%s]"),
/** 网关服务器等待超时,gateway:[%s],upstream:[%s] */
GATEWAY_TIMEOUT(S.increase(4),"网关服务器等待超时,gateway:[%s],upstream:[%s]"),
/** 因不明原因导致传输流出现致命错误 */
STREAM_ERR(S.increase(5),"因不明原因导致传输流出现致命错误"),
/** 数据不存在 */
DATA_NOT_EXIST(S.increase(6),"数据不存在"),
;
ServerErr(ErrorCode code, String msg){
this(new ErrorMessage(code,msg));
}
ServerErr(ErrorMessage message){
this.message = message;
}
private final ErrorMessage message;
@Override
public ErrorMessage getMessage() {
return message;
}
}