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

com.testdroid.api.APIException Maven / Gradle / Ivy

There is a newer version: 3.34.0
Show newest version
package com.testdroid.api;

/**
 * @author Łukasz Kajda 
 */
public class APIException extends Exception {

    private final Integer status;

    public APIException() {
        super();
        this.status = null;
    }

    public APIException(String message) {
        this(null, message);
    }

    public APIException(Integer status, String message) {
        super(message);
        this.status = status;
    }

    public APIException(Throwable t) {
        super(t);
        this.status = null;
    }

    public APIException(String message, Throwable t) {
        this(null, message, t);
    }

    public APIException(Integer status, String message, Throwable t) {
        super(message, t);
        this.status = status;
    }

    /**
     * HTTP status returned from API call or null if call hasn't been executed
     * yet.
     */
    public Integer getStatus() {
        return status;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy