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 EWLAttackDevException { 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"> Communication failure </div> 040 */ 041 DEVICES_ERR_COMMUNICATION_FAILURE(-1006, "Communication failure", "通讯失败"), 042 /** 043 * <div class="zh"> 无权限异常 </div> <div class="en"> no permission error </div> 044 */ 045 NO_PERMISSION_CALL_ERROR(-52, "no permission error", "无调用权限"), 046 /** 047 * <div class="zh"> 无触发时间 </div> <div class="en"> no trigger time </div> 048 */ 049 NO_ATTACK_TIME(1001, "no trigger time", "无触发时间"), 050 /** 051 * <div class="zh"> 清触发失败 </div> <div class="en"> Clear trigger failure </div> 052 */ 053 CLEAR_ATTACK_ERROR(-101, "Clear trigger failure", "清触发失败") 054 ; 055 private int errCodeFromBasement; 056 private String errMsgCn; 057 private String errMsgEn; 058 059 private EWLAttackDevException(int errCodeFromBasement, String errMsgEn, String errMsnCn) { 060 this.errCodeFromBasement = errCodeFromBasement; 061 this.errMsgCn = errMsnCn; 062 this.errMsgEn = errMsgEn; 063 } 064 065 public int getErrCodeFromBasement() { 066 return errCodeFromBasement; 067 } 068 069 public String getErrMsg() { 070 if (Utils.isZh()) { 071 return errMsgCn; 072 } else { 073 return errMsgEn; 074 } 075 076 } 077 078}