Package ai.nextbillion.maps.errors
Class ApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
ai.nextbillion.maps.errors.ApiException
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AccessNotConfiguredException,InvalidRequestException,MaxElementsExceededException,MaxRouteLengthExceededException,MaxWaypointsExceededException,NotFoundException,OverDailyLimitException,OverQueryLimitException,RequestDeniedException,UnknownErrorException,ZeroResultsException
public class ApiException
extends java.lang.Exception
ApiException and its descendants represent an error returned by the remote API. API errors are
determined by the
status field returned in any of the Geo API responses.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Modifier Constructor Description protectedApiException(java.lang.String message) -
Method Summary
Modifier and Type Method Description static ApiExceptionfrom(java.lang.String status, java.lang.String errorMessage)Construct the appropriate ApiException from the response.
-
Constructor Details
-
ApiException
protected ApiException(java.lang.String message)
-
-
Method Details
-
from
Construct the appropriate ApiException from the response. If the response was successful, this method will return null.- Parameters:
status- The status field returned from the APIerrorMessage- The error message returned from the API- Returns:
- The appropriate ApiException based on the status or null if no error occurred.
-