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

templates.qeex.QeexWebException.ftl Maven / Gradle / Ivy

There is a newer version: 3.0.3
Show newest version
package ${groupId}.api.qeex.exceptions;

public class QeexWebException extends Exception {
    public String projectName;
    public int id;
    public int code;
    public String message;
    public String language;

    protected QeexWebException() {
    }

    public static QeexWebException builder(String projectName) {
        var quex = new QeexWebException();
        quex.projectName = projectName;
        return quex;
    }

    public QeexWebException id(int id) {
        this.id = id;
        return this;
    }

    public QeexWebException code(int code) {
        this.code = code;
        return this;
    }

    public QeexWebException message(String message) {
        this.message = message;
        return this;
    }

    public QeexWebException language(String language) {
        this.language = language;
        return this;
    }


    public String toJson() {
        return "{\"projectName\":\"" + this.projectName + "\"," +
                "\"id\":" + this.id + ", " +
                "\"code\":" + this.code + ", " +
                "\"message\":\"" + this.message + "\", " +
                "\"language\":\"" + this.language + "\"" +
                "}";
    }

    @Override
    public String toString() {
        return "QuarkusWebException{" +
                "projectName='" + projectName + '\'' +
                ", id=" + id +
                ", code=" + code +
                ", message='" + message + '\'' +
                ", language='" + language + '\'' +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy