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

com.datarobot.impl.ClientException Maven / Gradle / Ivy

Go to download

This java client library allows you to quickly and easily communicate with the DataRobot AI API to add Machine Learning to your applications.

The newest version!
package com.datarobot.impl;

import com.datarobot.model.ErrorResponse;


public class ClientException extends Exception {
    private int statusCode;
    private ErrorResponse errorResponse;

    public ClientException(String message) {
        super(message);
    }

    public ClientException(String message, Exception inner) {
        super(message, inner);
    }


    public ClientException(String message, ErrorResponse response)
    {
        super(message);

        if (response != null) {
            this.statusCode = response.getStatusCode();
        }
        this.errorResponse = response;
    }

    public ClientException(String message, ErrorResponse response, Exception inner)
    {
        super(message, inner);

        if (response != null) {
            this.statusCode = response.getStatusCode();
        }
        this.errorResponse = response;
    }


    public ClientException(String message, int statusCode, Exception inner)
    {
        super(message, inner);
        this.statusCode = statusCode;
    }

    public int getStatusCode() {
        return this.statusCode;
    }
    public void setStatusCode(int statusCode) {

    }
    public ErrorResponse getErrorResponse() {
        return this.errorResponse;
    }

    public void setErrorResponse(ErrorResponse errorResponse) {
        this.errorResponse = errorResponse;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy