001 /*
002 * ===========================================================================================
003 * = COPYRIGHT
004 *          PAX Computer Technology (Shenzhen) Co., Ltd. PROPRIETARY INFORMATION
005 *   This software is supplied under the terms of a license agreement or nondisclosure
006 *   agreement with PAX Computer Technology (Shenzhen) Co., Ltd. and may not be copied or
007 *   disclosed except in accordance with the terms in that agreement.
008 *     Copyright (C) 2017-2023 PAX Computer Technology (Shenzhen) Co., Ltd. All rights reserved.
009 * Description: // Detail description about the function of this module,
010 *             // interfaces with the other modules, and dependencies.
011 * Revision History:
012 * Date                         Author                        Action
013 * 2017/04/01                   PAX                     Create/Add/Modify/Delete
014 * ===========================================================================================
015 */
016 
017package com.pax.dal.exceptions;
018
019import com.pax.dal.utils.Utils;
020
021public enum EWLCustomerDisplayDevException {
022    /**
023     * <div class="zh"> 未知异常 </div> <div class="en"> unexpected error </div>
024     */
025    DEVICES_ERR_UNEXPECTED(97, "unexpected error", "未知异常"),
026    /**
027     * <div class="zh"> 参数错误 </div> <div class="en"> invalid argument error </div>
028     */
029    DEVICES_ERR_INVALID_ARGUMENT (98, "invalid argument error", "参数错误"),
030    /**
031     * <div class="zh"> RPC I/O 连接异常 </div> <div class="en"> connect error </div>
032     */
033    DEVICES_ERR_CONNECT(99, "connect error", "RPC I/O 连接异常"),
034    /**
035     * <div class="zh"> 不支持 </div> <div class="en"> not support error </div>
036     */
037    DEVICES_ERR_NO_SUPPORT(100, "not support error", "不支持"),
038    /**
039     * <div class="zh"> 无权限异常 </div> <div class="en"> no permission error </div>
040     */
041    NO_PERMISSION_CALL_ERROR(-52, "no permission error", "无调用权限")
042    ;
043    private int errCodeFromBasement;
044    private String errMsgCn;
045    private String errMsgEn;
046
047    private EWLCustomerDisplayDevException(int errCodeFromBasement, String errMsgEn, String errMsnCn) {
048        this.errCodeFromBasement = errCodeFromBasement;
049        this.errMsgCn = errMsnCn;
050        this.errMsgEn = errMsgEn;
051    }
052
053    public int getErrCodeFromBasement() {
054        return errCodeFromBasement;
055    }
056
057    public String getErrMsg() {
058        if (Utils.isZh()) {
059            return errMsgCn;
060        } else {
061            return errMsgEn;
062        }
063
064    }
065
066}