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

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

Go to download

几乎所有的模块都依赖该模块,该模块中引入了一些常用工具类、通用的bean、全局异常处理、常量定义等

There is a newer version: 2.3.0.RELEASE
Show newest version
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