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 019public abstract class AGeneralException extends Exception { 020 021 private static final long serialVersionUID = 1L; 022 023 public static final int CUSTOMER_ERRCODE_BASE = 10000; 024 025 026 private String errModule = ""; 027 private int errCode; 028 private String errMsg = ""; 029 030 public AGeneralException(String module, int errCode, String errMsg) { 031 super(module + "#" + errCode + "(" + errMsg + ")"); 032 this.errModule = module; 033 this.errCode = errCode; 034 this.errMsg = errMsg; 035 } 036 037 public AGeneralException(String module, int errCode, String errMsg, String extraInfo) { 038 super(module + "#" + errCode + "(" + errMsg + ")" + "[" + extraInfo + "]"); 039 this.errModule = module; 040 this.errCode = errCode; 041 this.errMsg = errMsg; 042 } 043 044 public AGeneralException(String module, int errCode, String errMsg, Throwable throwable) { 045 super(module + "#" + errCode + "(" + errMsg + ")", throwable); 046 this.errModule = module; 047 this.errCode = errCode; 048 this.errMsg = errMsg; 049 } 050 051 public AGeneralException(String module, int errCode, String errMsg, String extraInfo, Throwable throwable) { 052 super(module + "#" + errCode + "(" + errMsg + ")" + "[" + extraInfo + "]", throwable); 053 this.errModule = module; 054 this.errCode = errCode; 055 this.errMsg = errMsg; 056 } 057 058 public String getErrModule() { 059 return errModule; 060 } 061 062 public int getErrCode() { 063 return errCode; 064 } 065 066 public String getErrMsg() { 067 return errMsg; 068 } 069}