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

de.sonallux.spotify.api.SpotifyApiException Maven / Gradle / Ivy

The newest version!
package de.sonallux.spotify.api;

import de.sonallux.spotify.api.models.Error;

import java.io.IOException;

public class SpotifyApiException extends IOException {

    private Error error;

    public SpotifyApiException(Error error) {
        super(error.getStatus() + " " + error.getMessage());
        this.error = error;
    }

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

    public SpotifyApiException(String message, Throwable cause) {
        super(message, cause);
    }

    public SpotifyApiException(String message, Error error) {
        super(message + ": " + error.getStatus() + " " + error.getMessage());
        this.error = error;
    }

    public SpotifyApiException(String message, Error error, Throwable cause) {
        super(message + ": " + error.getStatus() + " " + error.getMessage(), cause);
        this.error = error;
    }

    public Error getError() {
        return error;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy