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 019 020import com.pax.dal.utils.Utils; 021 022/** 023 * <div class="zh">LPR异常类。</div> <div class="en">LPR exception.</div> 024 */ 025public enum ELPRException { 026 /** 027 * <div class="zh"> 未知异常 </div> <div class="en"> unexpected error </div> 028 */ 029 DEVICES_ERR_UNEXPECTED(97, "unexpected error", "未知异常"), 030 /** 031 * <div class="zh"> 参数错误 </div> <div class="en"> invalid argument error </div> 032 */ 033 DEVICES_ERR_INVALID_ARGUMENT(98, "invalid argument error", "参数错误"), 034 /** 035 * <div class="zh"> RPC I/O 连接异常 </div> <div class="en"> connect error </div> 036 */ 037 DEVICES_ERR_CONNECT(99, "RPC I/O 连接异常", "connect error"), 038 /** 039 * <div class="zh"> 不支持 </div> <div class="en"> not support error </div> 040 */ 041 DEVICES_ERR_NO_SUPPORT(100, "不支持", "not support error"), 042 /** 043 * <div class="zh"> 无权限异常</div> <div class="en"> no permission error </div> 044 */ 045 DEVICES_ERR_NO_PERMISSION(101,"无权限异常","no permission error"), 046 /** 047 * <div class="zh">服务不可用错误</div> <div class="en">Service not available</div> 048 */ 049 SERVICE_NOT_AVAILABLE(1, "服务不可用错误", "Service not available"), 050 /** 051 * <div class="zh">无可用网络</div> <div class="en">Network connection error</div> 052 */ 053 NO_AVAILABLE_NETWORK(-3, "无可用网络", "Network connection error"), 054 /** 055 * <div class="zh">请求信息错误或设备未授权</div> <div class="en">Request information error or Unauthorized device</div> 056 */ 057 LPR_ERR_REQUEST_INFORMATION(-4, "请求信息错误或设备未授权", "Request information error or Unauthorized device"), 058 /** 059 * <div class="zh">授权信息错误或其他未知错误</div> <div class="en">Authentication information error</div> 060 */ 061 LPR_ERR_AUTH_INFORMATION(-5, "授权信息错误或其他未知错误", "Authentication information error"), 062 /** 063 * <div class="zh">摄像头ID设置错误</div> <div class="en">Camera ID error</div> 064 */ 065 LPR_ERR_CAMERA_ID(-6, "摄像头ID设置错误", "Camera ID error"), 066 /** 067 * <div class="zh">不支持该国家的车牌识别</div> <div class="en">National type error</div> 068 */ 069 LPR_ERR_NATIONAL_TYPE(-7, "不支持该国家的车牌识别", "National type error"), 070 /** 071 * <div class="zh">超时时间设置错误</div> <div class="en">Time value error</div> 072 */ 073 LPR_ERR_TIME_VALUE(-8, "超时时间设置错误", "Time value error"), 074 /** 075 * <div class="zh">LPR模块已open</div> <div class="en">The LPR is opened</div> 076 */ 077 LPR_ERR_IS_OPEND(-20, "LPR模块已open", "The LPR is opened"), 078 /** 079 * <div class="zh">LPR模块未open</div> <div class="en">The LPR is not opened</div> 080 */ 081 LPR_ERR_NOT_OPEND(-21, "LPR模块未open", "The LPR is not opened"), 082 /** 083 * <div class="zh">LPR模块已start</div> <div class="en">The LPR is started</div> 084 */ 085 LPR_ERR_IS_STARTED(-22, "LPR模块已start", "The LPR is started"), 086 /** 087 * <div class="zh">LPR模块未start</div> <div class="en">The LPR is not started</div> 088 */ 089 LPR_ERR_NOT_STARTED(-23, "LPR模块未start", "The LPR is not started"), 090 ; 091 092 093 private int errCodeFromBasement; 094 private String errMsgCn; 095 private String errMsgEn; 096 097 ELPRException(int errCodeFromBasement, String errMsnCn, String errMsgEn) { 098 this.errCodeFromBasement = errCodeFromBasement; 099 this.errMsgCn = errMsnCn; 100 this.errMsgEn = errMsgEn; 101 } 102 103 public int getErrCodeFromBasement() { 104 return errCodeFromBasement; 105 } 106 107 public String getErrMsg() { 108 if (Utils.isZh()) { 109 return errMsgCn; 110 } else { 111 return errMsgEn; 112 } 113 114 } 115 116}