io.github.lyc8503.spring.starter.incantation.exception.BizException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opening-incantation-spring-boot-starter Show documentation
Show all versions of opening-incantation-spring-boot-starter Show documentation
Some magic incantation for Spring Boot
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