com.fengwenyi.apistarter.exception.ApiException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-spring-boot-starter Show documentation
Show all versions of api-spring-boot-starter Show documentation
Spring Boot API Starter Project
package com.fengwenyi.apistarter.exception;
import com.fengwenyi.api.result.IReturnCode;
import lombok.Getter;
import lombok.Setter;
/**
* API Exception
* @author Erwin Feng
* @since 2021-08-11
*/
@Getter
@Setter
public class ApiException extends RuntimeException {
private static final long serialVersionUID = -5829546532420722185L;
private IReturnCode returnCode;
public ApiException() {
}
public ApiException(String message) {
super(message);
}
public ApiException(IReturnCode returnCode) {
this.returnCode = returnCode;
}
public ApiException(IReturnCode returnCode, String message) {
super(message);
this.returnCode = returnCode;
}
public ApiException(IReturnCode returnCode, Throwable cause) {
super(cause);
this.returnCode = returnCode;
}
public ApiException(IReturnCode returnCode, Throwable cause, String message) {
super(message, cause);
this.returnCode = returnCode;
}
}