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

io.github.lyc8503.spring.starter.incantation.exception.BizException Maven / Gradle / Ivy

The newest version!
package io.github.lyc8503.spring.starter.incantation.exception;

import lombok.Getter;

public class BizException extends RuntimeException {
    @Getter
    private final int code;
    @Getter
    private final String message;
    @Getter
    private final int httpCode;

    public BizException(ErrorType type) {
        this.code = type.getCode();
        this.message = type.getMessage();
        this.httpCode = type.getHttpCode();
    }

    public BizException(ErrorType type, String msg) {
        this.code = type.getCode();
        this.message = msg;
        this.httpCode = type.getHttpCode();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy