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

javastrava.api.v3.service.exception.StravaUnknownAPIException Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha
Show newest version
package javastrava.api.v3.service.exception;

import javastrava.api.v3.model.StravaResponse;

/**
 * 

* Thrown when the Strava API returns an unexpected HTTP status indicating an error has occurred *

* * @author Dan Shannon */ public class StravaUnknownAPIException extends RuntimeException implements StravaAPIException { /** * Default */ private static final long serialVersionUID = 1L; /** * Response from Strava API containing error details */ private StravaResponse response; /** * @param status Status string * @param response Response received from Strava with error details * @param cause Underlying cause of the exception */ public StravaUnknownAPIException(final String status, final StravaResponse response, final Throwable cause) { super(status + " : " + (response == null ? null : response.toString()), cause); //$NON-NLS-1$ setResponse(response); } /** * @see javastrava.api.v3.service.exception.StravaAPIException#getResponse() */ @Override public StravaResponse getResponse() { return this.response; } /** * @see javastrava.api.v3.service.exception.StravaAPIException#setResponse(javastrava.api.v3.model.StravaResponse) */ @Override public void setResponse(final StravaResponse response) { this.response = response; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy