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

com.fengwenyi.apistarter.exception.ApiException Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
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;
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy