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

com.gccloud.starter.common.exception.GlobalException Maven / Gradle / Ivy

package com.gccloud.starter.common.exception;

import com.gccloud.starter.common.constant.GlobalConst;
import lombok.Data;

/**
 * @author liuchengbiao
 * @date 2020-06-12 16:11
 */
@Data
public class GlobalException extends RuntimeException {

    private int code = GlobalConst.Response.Code.SERVER_ERROR;

    public GlobalException(String msg) {
        super(msg);
    }

    public GlobalException(String msg, Throwable e) {
        super(msg, e);
    }

    public GlobalException(String msg, int code) {
        super(msg);
        this.setCode(code);
    }

    public GlobalException(String msg, int code, Throwable e) {
        super(msg, e);
        this.setCode(code);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy