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 EFingerprintDevException { 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 DEVICES_ERR_NO_PERMISSION(101,"no permission error","无权限异常"), 042 /** 043 * <div class="zh"> 服务不可用 </div> <div class="en"> service not available </div> 044 */ 045 SERVICE_NOT_AVAILABLE(1, "service not available", "服务不可用"), 046 /** 047 * <div class="zh"> 设备下电失败 </div> <div class="en"> fingerprint module power off failure </div> 048 */ 049 FINGER_ERR_NOT_POWER_OFF(2,"fingerprint module power off failure ","设备下电失败"), 050 /** 051 * <div class="zh">设备上电失败</div> <div class="en"> fingerprint module power on failure </div> 052 */ 053 FINGER_ERR_NOT_POWER_ON(3,"fingerprint module power on failure","设备上电失败"), 054 /** 055 * <div class="zh">指纹模块已open</div> <div class="en"> fingerprint module is open </div> 056 */ 057 FINGER_ERR_IS_OPEND(4,"fingerprint module is open","指纹模块已open"), 058 /** 059 * <div class="zh">指纹模块未open</div> <div class="en"> fingerprint module is not open </div> 060 */ 061 FINGER_ERR_NOT_OPEND(5,"fingerprint module is not open","指纹模块未open"), 062 /** 063 * <div class="zh">指纹模块已start</div> <div class="en"> fingerprint module has been started </div> 064 */ 065 FINGER_ERR_IS_STARTED(6,"fingerprint module has been started","指纹模块已start"), 066 /** 067 * <div class="zh">指纹模块未start</div> <div class="en"> fingerprint module not started </div> 068 */ 069 FINGER_ERR_NOT_STARTED(7,"fingerprint module not started","指纹模块未start"), 070 ; 071 072 private int errCodeFromBasement; 073 private String errMsgCn; 074 private String errMsgEn; 075 076 private EFingerprintDevException(int errCodeFromBasement, String errMsgEn, String errMsnCn) { 077 this.errCodeFromBasement = errCodeFromBasement; 078 this.errMsgCn = errMsnCn; 079 this.errMsgEn = errMsgEn; 080 } 081 082 public int getErrCodeFromBasement() { 083 return errCodeFromBasement; 084 } 085 086 public String getErrMsg() { 087 if (Utils.isZh()) { 088 return errMsgCn; 089 } else { 090 return errMsgEn; 091 } 092 093 } 094}