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 */
016package com.pax.dal.exceptions;
017
018import com.pax.dal.utils.Utils;
019
020/**
021 * <div class="zh">顾客显示屏操作模块的异常。</div>
022 * <div class="en">Exception of customer display screen operation module.</div>
023 * @since V3.25.00
024 */
025public enum ECustomerDisplayDevException {
026    /**
027     * <div class="zh"> 未知异常 </div> <div class="en"> unexpected error </div>
028     */
029    DEVICES_ERR_UNEXPECTED(97, "unexpected error", "未知异常"),
030
031    /**
032     * <div class="zh"> 参数错误 </div> <div class="en"> invalid argument error </div>
033     */
034    DEVICES_ERR_INVALID_ARGUMENT (98, "invalid argument error", "参数错误"),
035
036    /**
037     * <div class="zh"> RPC I/O 连接异常 </div> <div class="en"> connect error </div>
038     */
039    DEVICES_ERR_CONNECT(99, "connect error", "RPC I/O 连接异常"),
040
041    /**
042     * <div class="zh"> 不支持 </div> <div class="en"> not support error </div>
043     */
044    DEVICES_ERR_NO_SUPPORT(100, "not support error", "不支持"),
045
046    /**
047     * <div class="zh"> 无权限异常</div> <div class="en"> no permission error </div>
048     */
049    DEVICES_ERR_NO_PERMISSION(101,"no permission error","无权限异常"),
050    ;
051    private int errCodeFromBasement;
052    private String errMsgCn;
053    private String errMsgEn;
054
055    private ECustomerDisplayDevException(int errCodeFromBasement, String errMsgEn, String errMsnCn) {
056        this.errCodeFromBasement = errCodeFromBasement;
057        this.errMsgCn = errMsnCn;
058        this.errMsgEn = errMsgEn;
059    }
060
061    public int getErrCodeFromBasement() {
062        return errCodeFromBasement;
063    }
064
065    public String getErrMsg() {
066        if (Utils.isZh()) {
067            return errMsgCn;
068        } else {
069            return errMsgEn;
070        }
071
072    }
073}