All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.brm.exception.BaseException Maven / Gradle / Ivy

The newest version!
package com.dahuatech.icc.brm.exception;

/**
 * program:java-sdk
 *
 * Author: 312013
 * Date:2022-07-13 09:58
 * Description: 异常基类
 */

public class BaseException extends RuntimeException {

    /**
     * 错误信息
     * **/
    private String errorMsg;

    /**
     * 错误代码
     */
    private String code;

    /**
     * 用于构建错误描述的参数
     */
    private Object args;

    BaseException(){}

    BaseException(String code){
        this.code = code;
    }

    BaseException(String code, String errorMsg){
        this.code = code;
        this.errorMsg = errorMsg;
    }

    BaseException(String code, String errorMsg, Object args){
        this.args = code;
        this.errorMsg = errorMsg;
        this.code = code;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Object getArgs() {
        return args;
    }

    public void setArgs(Object args) {
        this.args = args;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy